SwiftUI - DatePicker Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 55

  • @seanallen
    @seanallen  4 ปีที่แล้ว +2

    If you enjoy my teaching/presentation style, I've started creating my own iOS development courses at seanallen.teachable.com. You can watch the first ~10% of each course for free to get a feel for them.

  • @manwithllama
    @manwithllama 3 ปีที่แล้ว +2

    Sean! This is my first time coming across your channel. Today, I've watched about 5 different videos on Swift. Yours? Best one by far!
    I'm a beginner. Your cadence is perfect. You don't have any filler words. You seem warm and friendly. I didn't feel stupid watching your lesson. And you don't try to speed through like so many coders do. Oh-and you were so thorough about the whole thing! Really, really dig your teaching style man!
    PS: I skipped back just to grab the link to your teaching site. (I *never* do that for other vids.)

    • @seanallen
      @seanallen  3 ปีที่แล้ว

      Thanks for the kind words. Happy to hear you enjoy my teaching style!

  • @donathmm3881
    @donathmm3881 4 ปีที่แล้ว +6

    I would like to see tutorial how to create iOS 14 widgets for existing uikit projects

  • @raulgutierrez5862
    @raulgutierrez5862 4 ปีที่แล้ว +2

    Thank you Sean! Just what I was looking for 🤯

    • @seanallen
      @seanallen  4 ปีที่แล้ว +2

      Happy to help!

  • @toastrecon
    @toastrecon 4 ปีที่แล้ว +1

    Always helpful! Thanks, Sean!

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      No problem, David.

  • @tariqAlmazyad
    @tariqAlmazyad 4 ปีที่แล้ว +1

    Simple tutorial, yet it has powerful details. Thanks .
    I am so hoping you make Combine tutorial about URLSessions , and diff usages

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      I still need more practice with Combine, myself. I'll get there in time.

    • @tariqAlmazyad
      @tariqAlmazyad 4 ปีที่แล้ว +1

      @@seanallen waiting for the quality content by you ✌️😬

  • @bartoszdolewski4915
    @bartoszdolewski4915 4 ปีที่แล้ว +3

    Long overdue from Apple to ship some calendar component. I wish that it’s less buggy and does not throw bunch of broken constraint warnings in Xcode console ;)

  • @MarvelousLXVII
    @MarvelousLXVII 4 ปีที่แล้ว +1

    Great video as usual.

  • @aleksandertesenkov1421
    @aleksandertesenkov1421 ปีที่แล้ว

    Great video Sean. I wonder if the date picker has an option to return nil? I would like to use it in case my model date is optional, for example I don’t know a birthday or an appointment date etc.

  • @WestCoastAce27
    @WestCoastAce27 4 ปีที่แล้ว +1

    Wow. So much easier than Objective-C. Great job.

  • @gabrielrml
    @gabrielrml 3 ปีที่แล้ว +1

    OK How would we isolate the month part of the date in SwiftUI

  • @netfreak9
    @netfreak9 4 ปีที่แล้ว

    How does DatePicker show time in 24-hr format in the compact datepickerstyle. I need this for a military time application irrespective of users locale selection. No AM/PM.
    For eg Time-22:54

    • @jakubcharvat4902
      @jakubcharvat4902 4 ปีที่แล้ว +1

      In SwiftUI the DatePicker uses the system locale setting, so if the user has their phone set to 24-hr then that's what they'll get with the DatePicker. If you really want to set the locale explicitly you'd need to drop down to using UIDatePicker, which has a locale property, in a UIViewRepresentable.

    • @netfreak9
      @netfreak9 4 ปีที่แล้ว +1

      @@jakubcharvat4902 Thanks for the reply buddy, I just found .environment modifier to the DatePicker which can set the Locale. I used “en_GB” to switch the DatePicker to 24-hr clock irrespective of the user’s preference.

    • @jakubcharvat4902
      @jakubcharvat4902 4 ปีที่แล้ว +1

      @@netfreak9 Amazing, didn't think of using the environment, great find :)

  • @fassko
    @fassko 4 ปีที่แล้ว +1

    I don't like that there is no Done button once the date picker is expanded. Users just don't understand that they need to tap outside on the screen. Do you know a solution for this?

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      I agree. As far as I know, the user needs to tap outside the date picker to dismiss it. I'm not aware of a "done" button type solution.

    • @jakubcharvat4902
      @jakubcharvat4902 4 ปีที่แล้ว

      I don't think DatePicker has anything like an accessoryView, even in UIKit. The only way I can think of is hijacking the tap on the compact DatePicker view, and opening a custom view with a button and a Graphical DatePicker. I can try and put an example together if you'd like, although it's a big hack and you probably want to stick with the default behaviour.

  • @abdulghani9962
    @abdulghani9962 9 หลายเดือนก่อน

    Can we only pick the months and years?

  • @ВадимВоронков-д9ы
    @ВадимВоронков-д9ы 3 ปีที่แล้ว

    hello! Thank you for your lessons
    I have a question, how can i close datePicker after i tap and pick a date.?

  • @israelmanzo8725
    @israelmanzo8725 4 ปีที่แล้ว +1

    I love the new date picker for SwiftUI, was about time to improve this feature that Android has long time ago.

  • @muratbekgi6015
    @muratbekgi6015 3 ปีที่แล้ว

    how can I use this as a new page on my existing project ?

  • @ktmman1503
    @ktmman1503 3 ปีที่แล้ว

    Great job Sean... I love the way you explain things.. Can you just select a month only ?? Cheers... Craig

  • @darrenferguson5267
    @darrenferguson5267 4 ปีที่แล้ว

    Thanks good info, good style in putting it across well explained, just thought today need a date on my app just wondering if it will update daily or is that something else I need to look for,

  • @JHEVR
    @JHEVR 2 ปีที่แล้ว

    what if I want my date picker to popup

  • @rajithagayashan9838
    @rajithagayashan9838 4 ปีที่แล้ว +2

    Thank you! :)

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      You're welcome!

  • @rungxanh2901
    @rungxanh2901 4 ปีที่แล้ว

    This is plain awesome! 🤩 Thank you Sean!

  • @DeconstructedLearningOfficial
    @DeconstructedLearningOfficial 2 ปีที่แล้ว

    Hi Sean I love your content I hope you reply to my query . Recently I booked a movie ticket on my iPhone on a website . After I booked , it showed up in my iPhone calendar. I want to implement this on an app I am building. Any ideas what to learn . I have previously seen this while I was setting up a .ics file. Still clueless, really hoping for your reply. Regards

    • @seanallen
      @seanallen  2 ปีที่แล้ว

      I've never had to implement that feature before, so I don't know without researching it.

  • @LeahLundqvist
    @LeahLundqvist 4 ปีที่แล้ว

    Damn this component is so beautiful 😍

    • @seanallen
      @seanallen  4 ปีที่แล้ว +1

      It's a huge improvement.

  • @vorapons5172
    @vorapons5172 4 ปีที่แล้ว

    Thank you for knowledge

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Happy to help, Vorapon

  • @kiohaha
    @kiohaha 2 ปีที่แล้ว

    what about selecting a range and having it highlighted as you do it. why isn't this a feature. it is in android isn't it. so lacking the features for some things in swiftui

  • @farizmaulana2544
    @farizmaulana2544 4 ปีที่แล้ว

    Hi Sean, just bump into your couple videos. I'm interested in taking your course, but before that I have couple questions. How can I reach you?

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Hi Fariz, you can find my email in the "about" section on my youtube channel.

  • @vandanpatel3395
    @vandanpatel3395 4 ปีที่แล้ว

    What's up with the yellow background and SwiftUI? :) I think a lot of people have faced that issue. Am I right?

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      I have no idea what you are referring to.

    • @vandanpatel3395
      @vandanpatel3395 4 ปีที่แล้ว

      @@seanallen Oh, it wasn't pointed at you, Sean. I am sorry if it came across like that. It was just a comment for the community where SwiftUI views sometimes show up with the yellow background randomly. I was just trying to see how many people actually faced that issue.

  • @icode7334
    @icode7334 4 ปีที่แล้ว +1

    These videos are really good, I wish your course was cheaper.

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Thanks for the kind words. If you live in a country where the currency doesn't convert well or have financial issues, feel free to reach out. I'm happy to give discounts to those in need.

    • @icode7334
      @icode7334 4 ปีที่แล้ว

      @@seanallen Thanks you so much for your kind act and support, the course is a bit expensive when I convert it to my currency. To be honest, I believe there are people who need it more than me but I still wanna thank you for this act.

  • @donathmm3881
    @donathmm3881 4 ปีที่แล้ว

    🙏Thank you