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. 👍🏼
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!
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
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!
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.
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!
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
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.
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.
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!
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
ForEach (1..
Your videos are becoming the SwiftUI manual Apple didn’t bother to write! Thank you for your effort.
Haha thanks Paul!
I'll have to watch your whole course again to understand a simple textField
You are doing a great job with these videos. I love the muscle memory of doing this 50 times. LOL
Hahaha practice makes perfect!
Button SAVE disabled() -> Solution is fantastic 🤯
Thank you 😊👍
I really appreciate your videos, man! You are amazinggg!
I appreciate that! Thanks man
Why i am feeling that i am watching Cristiano Ronaldo explaining SwiftUI !. Thanks a ton.
Love all your content, thank you so much!
Aswin!!! Thanks for watching.
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. 👍🏼
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 :)
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!
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!
Than you Nick. Will complete the tutorial series slowly but surely.
Good video. Easy to understand
Straight to the point, and then followed up with a great use case example. Subscribed!
Very helpful! Thank you!
Great Tutorial! This will work perfect in my first app.
You are the best buddy🙌🏻🙌🏻👏🏻
Hey Nick, what about an Binding textfield
How to change a cursor color of a TextField in Swift
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
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!
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.
It sounds like you may not need to return a result from the textIsAppropriate function anymore (ie remove the -> Bool )
If you’re using the return in some places, but not others, you can also mark the function as @discardableResult, to indicate that!
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!
Thank you!!! I love you!!! ^^
No problem 😊 thank you 최승기 :)
Thanks for the video.
Beside appending, how can we use TextField to change the string we created?
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
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.
is there any way for stateless TextField, I just wanted to pass onChangeText + text from the view model , I came from android bd
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?
very useful video, thank you!
awsome!!
Hey Nick et do you know how to do dynamic Resizable Textfield just like an iMessage Thank you
Teach us how to change a text field placeholders color!
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.
Numbers should not added in username how to do that ?
super useful
Agreed!
hello nick How to link TextField in SwiftUI to a database in a site, for example (registering name, email and password)
This is great!
Thank u bro...😇
Thank you very much!!!! Great.
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.
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.
Thank you!
Thank you .. Helpful
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!
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
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