How to use TextField in SwiftUI | Bootcamp #35

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

Комментарии • 56

  • @shazimulkaif1103
    @shazimulkaif1103 9 месяцев назад +12

    ForEach (1..

  • @paulraggett7837
    @paulraggett7837 3 года назад +53

    Your videos are becoming the SwiftUI manual Apple didn’t bother to write! Thank you for your effort.

  • @dugrut1325
    @dugrut1325 2 года назад +2

    I'll have to watch your whole course again to understand a simple textField

  • @AZMerf
    @AZMerf 3 года назад +9

    You are doing a great job with these videos. I love the muscle memory of doing this 50 times. LOL

  • @qora_qoya
    @qora_qoya 2 года назад

    Button SAVE disabled() -> Solution is fantastic 🤯
    Thank you 😊👍

  • @kingcopones
    @kingcopones 3 года назад +4

    I really appreciate your videos, man! You are amazinggg!

  • @hammam92
    @hammam92 Год назад +1

    Why i am feeling that i am watching Cristiano Ronaldo explaining SwiftUI !. Thanks a ton.

  • @aswinpak7767
    @aswinpak7767 3 года назад +2

    Love all your content, thank you so much!

  • @netfreak9
    @netfreak9 3 года назад +2

    As always, beautifully explained, if you could do a video on restricting data input to certain characters(max length) or only numbers or a range of numbers (e.g 10-40) or valid phone numbers etc ... that would be great.
    Unlike other tutorials on RUclips, best part of your videos is you do not use jargon to explain jargon. All your videos are easy to understand. Great job. 👍🏼

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +2

      Haha thanks for the comment netfreak9. I'm glad you said that because I feel the same way! I'm trying to make it as simple as possible :)

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +2

      I should have covered in it the video (sorry) but you can restrict data input to numbers by using .keyboardType(.numberPad) modifier on the TextField!

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +3

      Validating input text is a little more advanced than this video, but I cover the basics of it in this video (ruclips.net/video/nwpmWu1SP1k/видео.html) and I cover a more advanced way to do it in this video (ruclips.net/video/Q-1EDHXUunI/видео.html). However, I'd recommend continuing the course in order and you'll come across both of these soon enough!

    • @netfreak9
      @netfreak9 3 года назад +1

      Than you Nick. Will complete the tutorial series slowly but surely.

  • @ChangKeongYong
    @ChangKeongYong 5 месяцев назад

    Good video. Easy to understand

  • @cosmicgamingunlimited
    @cosmicgamingunlimited 2 года назад

    Straight to the point, and then followed up with a great use case example. Subscribed!

  • @yuchen3587
    @yuchen3587 2 года назад +2

    Very helpful! Thank you!

  • @warrenscorner
    @warrenscorner Год назад

    Great Tutorial! This will work perfect in my first app.

  • @eraypiskin
    @eraypiskin 9 месяцев назад

    You are the best buddy🙌🏻🙌🏻👏🏻

  • @merakshot9277
    @merakshot9277 4 месяца назад

    Hey Nick, what about an Binding textfield

  • @imarksea
    @imarksea 7 месяцев назад

    How to change a cursor color of a TextField in Swift

  • @markgalperin780
    @markgalperin780 3 года назад +1

    Hey Nick, great tutorial. I just have one question are users gonna be provided with keyboard, as I am not really sure how would they write on their phones without a keyboard

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад

      Haha yea of course 😂 It doesn’t happen on the preview canvas but if you build the app to you phone you’ll see it happen. As soon as a user clicks on the textfield the keyboard will automatically pop up!

  • @brucknerdevilliers
    @brucknerdevilliers 2 года назад +1

    Good one! I played with the code and called the textIsAppropriate() from the main body, which in turn called the saveData(). It makes the main body even cleaner and does the job, but does throw a warning that the result from the textIsAppropriate is unused, which I don't understand as it is used in two other places.

    • @SwiftfulThinking
      @SwiftfulThinking  2 года назад

      It sounds like you may not need to return a result from the textIsAppropriate function anymore (ie remove the -> Bool )

    • @SwiftfulThinking
      @SwiftfulThinking  2 года назад

      If you’re using the return in some places, but not others, you can also mark the function as @discardableResult, to indicate that!

  • @istalzer2
    @istalzer2 5 месяцев назад

    Love your videos! Thank you so much for putting these out.
    Circling back on this one as I keep getting very strange yellow warnings when clicking into textfields. Sometimes it complains about NaN values. Other times sessionID or multiple constraints. Seems to change build to build.
    Any ideas what these are?
    Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
    -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations
    Thanks again for your videos!! Learning concurrency now!

  • @최승기-g8f
    @최승기-g8f 3 года назад +1

    Thank you!!! I love you!!! ^^

  • @punkysuen
    @punkysuen 2 года назад

    Thanks for the video.
    Beside appending, how can we use TextField to change the string we created?

  • @bbulliard
    @bbulliard 2 года назад

    Great video nick. I’m writing an oil gas calculation app. Do you have any videos on publishing apps and providing a caveat when app is published in case of bugs or, in my case gas calculation ‘mis-calculations’. Was thinking about crediting customer account and let him have app free, then I would simply correct the bug. Leaving money in your coffee cup for such wonderful videos

  • @KhoaTran-oj3wm
    @KhoaTran-oj3wm 5 месяцев назад

    Hi Nick,
    Thank you for your effort.
    Can you please share/upload all code in your videos for reference? It will help us a lot.

  • @Z1ew-k1q
    @Z1ew-k1q 5 месяцев назад

    is there any way for stateless TextField, I just wanted to pass onChangeText + text from the view model , I came from android bd

  • @quervy4097
    @quervy4097 3 года назад

    Hey super stuck right now, if I want to use the data passed into a text field on one page and use that data on another page?

  • @JeckyKA
    @JeckyKA 3 года назад

    very useful video, thank you!

  • @sadeqnoori8707
    @sadeqnoori8707 3 года назад +1

    awsome!!

  • @FabricioMTL
    @FabricioMTL 2 года назад

    Hey Nick et do you know how to do dynamic Resizable Textfield just like an iMessage Thank you

  • @esotomay21
    @esotomay21 3 года назад +1

    Teach us how to change a text field placeholders color!

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +1

      Hi Enrique! We actually can't do that with a SwiftUI textfield (yet at least). You would need to create a UIViewRepresentable for a UITextField and convert it from UIKit to SwiftUI. It's a litte more advanced than the videos in this series, but will be covered in my Advanced bootcamp.

  • @LuckyGuy143
    @LuckyGuy143 2 года назад

    Numbers should not added in username how to do that ?

  • @Decatilinae
    @Decatilinae 3 года назад +1

    super useful

  • @ahliz
    @ahliz 2 года назад

    hello nick How to link TextField in SwiftUI to a database in a site, for example (registering name, email and password)

  • @elvisbucatariu
    @elvisbucatariu Год назад

    This is great!

  • @knowledgeispower4953
    @knowledgeispower4953 10 месяцев назад

    Thank u bro...😇

  • @anvarkhonmunavvarov1326
    @anvarkhonmunavvarov1326 3 года назад

    Thank you very much!!!! Great.

  • @jesyaritmonmorm5836
    @jesyaritmonmorm5836 Год назад

    It comes out as if I have caps lock on (but I don’t) when I type. I’ve done Bootcamp #0 - #34 in this course. I’ve no clue why this is happening.

    • @jesyaritmonmorm5836
      @jesyaritmonmorm5836 Год назад

      Wowzers! How Absolutely odd! I put file -> save and then I quit Xcode, then I shut down my mac and then turned it back on, reopened xcode, reopened SwiftfulThinkingBootcamp and tried typing in the textfield and now it comes out normal in both the textfield and after clicking the blue save button. How utterly weird, but it works now.

  • @ClintonSiegel
    @ClintonSiegel 2 года назад

    Thank you!

  • @sergiovinhal5934
    @sergiovinhal5934 3 года назад

    Thank you .. Helpful

  • @MonsterLombard
    @MonsterLombard 3 года назад

    hey man love the video! Just wondering if there is a way that I can force the user to only use numbers, if you could get back to me then that would be great, thanks!

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад

      Hey man! Well you can change the keyboard type to a number pad (or decimal pad?) and then users would only be able to type number digits

  • @bbulliard
    @bbulliard 2 года назад

    I tried to buy you 3 coffees but your web page wants a zip code and there is no place for the zip code so I couldn’t buy you a coffee. Plz fix so I can buy u coffee. Thanks, bob