How to use TextField in SwiftUI | Bootcamp #35

preview_player
Показать описание
In this video we will learn how to use TextFields within our SwiftUI applications. Textfields are a simple solution to provide a place for your users to type something in! We will look into the textfield's initializer and a few ways to add custom formatting. We will also look at how to use @State variables to bind them to the Textfield's value so that we can use the entered text elsewhere in our application!

🤙 WELCOME BACK 🤙

Рекомендации по теме
Комментарии
Автор

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

paulraggett
Автор

ForEach { index in
Text("Thanks you for making these videos 🙂")

}

shazimulkaif
Автор

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

dugrut
Автор

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

AZMerf
Автор

Button SAVE disabled() -> Solution is fantastic 🤯


Thank you 😊👍

qora_qoya
Автор

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

kingcopones
Автор

My Learnings:
1. You can take advantage of `.format` parameter of textfield initializer for using framework provided formatting. Like:
a. Use PersonNameComponents instance as binding with `.name` format for better name structuring.
b. Use double as binding and then pass .currency(name) as a parameter to show currency symbol.
2. You can create a textfield that grow vertically by using `axis` modifier in the initializer.

the_avii_
Автор

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 YouTube, best part of your videos is you do not use jargon to explain jargon. All your videos are easy to understand. Great job. 👍🏼

netfreak
Автор

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

hammam
Автор

Love all your content, thank you so much!

aswinpak
Автор

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

warrenscorner
Автор

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

cosmicgamingunlimited
Автор

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.

brucknerdevilliers
Автор

Hey Nick, what about an Binding<Optional> textfield

merakshot
Автор

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.

KhoaTran-ojwm
Автор

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

bbulliard
Автор

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 perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = <null selector>, customInfoType = UIEmojiSearchOperations

Thanks again for your videos!! Learning concurrency now!

istalzer
Автор

Teach us how to change a text field placeholders color!

esotomay
Автор

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

punkysuen
Автор

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

FabricioMTL
visit shbcf.ru