Тёмный

SwiftUI Form w/ TextField, DatePicker, Toggle, Stepper, Link and Sections w/ Header 

Sean Allen
Подписаться 153 тыс.
Просмотров 57 тыс.
50% 1

Head to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
In today's video I show you how to create a Form in SwiftUI. We'll build a SwiftUI View that resembles a typical account screen that you would find in an app. I populate the Form with common elements you may use like TextFields, DatePicker, Toggle, Stepper, and a Link. I also show you how to break the form into sections with section headers and way to handle some keyboard issues you may have with your Form.
This tutorial was created in Xcode 12.5 and Swift 5.4.
SF Symbols Video:
• What's New in SFSymbol...
If you like my teaching or presentation style, I've started creating my own courses:
seanallen.teachable.com/
Twitter:
/ seanallen_dev
Link to my book - How I Became an iOS Developer:
gumroad.com/l/sean-allen-origin
Hired.com:
hired.com/x/1n01g
Check out my podcast, iOS Dev Discussions:
itunes.apple.com/us/podcast/i...
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Ray Wenderlich Books:
store.raywenderlich.com/a/208...
Ray Wenderlich Videos:
store.raywenderlich.com/a/208...
Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803
Learn Advanced Swift Here:
gumroad.com/a/656585843
Links to my iOS Dev Setup & iOS Dev Book Recommendations
www.amazon.com/shop/seanallen
#swift #softwaredeveloper #iosdeveloper

Наука

Опубликовано:

 

4 май 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 85   
@seanallen
@seanallen 3 года назад
If you enjoy my teaching/presentation style, I started creating my own iOS development courses at seanallen.teachable.com. You can watch the first ~10% as a free preview to get a feel for them.
@a4advanture755
@a4advanture755 3 года назад
I love it . i love your coding style because of amazing skill you have .
@obtusei
@obtusei 3 года назад
SwiftUI becomes even easier after Sean's explanation... Thank you Sean!
@seanallen
@seanallen 3 года назад
Thanks for the kind words, Abhi.
@glennadams7047
@glennadams7047 3 года назад
This is a great demo of where SwiftUI shines vs UIKit. Thanks Sean.
@seanallen
@seanallen 3 года назад
Agreed. Really excited to see the improvements at WWDC this year. Hopefully we get another big step.
@shedrackejeh6542
@shedrackejeh6542 3 года назад
Thank you Sean for all the tutorials, I don't have a Macbook yet but, I will use mac in cloud, I can't wait to play with swiftUI🚀🚀
@williamallen4607
@williamallen4607 2 года назад
Very clear and helpful. Thanks, Sean.
@martinmaulhardt9852
@martinmaulhardt9852 3 года назад
The master of IOS is you, Sean. Can’t believe I’m doing my first app thanks to you. Cheers from Argentina, my friend!
@seanallen
@seanallen 3 года назад
Best of luck with the app, Martin!
@ClintonSiegel
@ClintonSiegel Год назад
Super helpful and informative!! Thank you!!
@kibugenzaking3473
@kibugenzaking3473 Год назад
this is really great, keep up the great work Sean Allen
@seanallen
@seanallen Год назад
Thanks, will do!
@karhoshe
@karhoshe 3 года назад
Thanks for the demo, can add this to my project now. 👍🏻
@seanallen
@seanallen 3 года назад
Glad to help, Karho.
@andrevdw747
@andrevdw747 2 года назад
Great tutorial again Sean, thanks!
@seanallen
@seanallen 2 года назад
Glad you liked it!
@LaurIle
@LaurIle 3 года назад
Hey Sean, would love to see a SpriteKit series on youtube or a new course about it. Many of us would like to dive into iOS game development and all the tutorials out there are 3-5 years old. Also great video!
@seanallen
@seanallen 3 года назад
SpriteKit videos are pretty high on my to-do list. You may see those soon...
@manoz1245
@manoz1245 3 года назад
Man Very easy to learn.. I am doing the screen while watching your videos. Thanks alot..
@seanallen
@seanallen 3 года назад
Happy to help, Manoz!
@radfaredu644
@radfaredu644 Год назад
Thank You i learned a lots of new things
@fadyyecob
@fadyyecob 3 года назад
Nice video. A tip for automatically creating closures: you can just hit enter and Xcode should automatically create the closure. E.g. when creating a Button(LocalizedStringKey, () -> Void), when you click enter on () -> Void it will create the closure.
@seanallen
@seanallen 3 года назад
Thanks for the tip, Fady! That always gets me.
@andrejkling3886
@andrejkling3886 3 года назад
Good lesson Sean... thank you
@seanallen
@seanallen 3 года назад
Happy to help, Andrej.
@user-yf8ns8ox5k
@user-yf8ns8ox5k 2 года назад
You are the best, bro ;)
@elbah
@elbah 3 года назад
Gréât vidéo , Thanks you Allen
@seanallen
@seanallen 3 года назад
Happy to help!
@wocaoli2618
@wocaoli2618 3 года назад
very nice video, thanks,is helpful for me
@seanallen
@seanallen 3 года назад
Glad you liked it, Naicai!
@rudrakshya1
@rudrakshya1 2 года назад
Very good content. Thank you for your efforts.
@seanallen
@seanallen 2 года назад
My pleasure
@rudrakshya1
@rudrakshya1 2 года назад
@@seanallen Can you please make a video how to segue on button click in SwiftUI. I find it quite difficult.
@danzeitman9319
@danzeitman9319 3 года назад
Sean great video! So.. if less is more... how might you refactor this so the keyboard dismiss button only appears in the toolbar when the keyboard is actually displayed.
@drfalcoew8939
@drfalcoew8939 2 года назад
Hi Sean, thanks for the video! Question: Do all of your videos follow the MVVM outline? I'm new to both SwiftUI and MVVM, so I'm trying to make sure I'm learning both simultaneously.
@fredrigaudeau
@fredrigaudeau 3 года назад
Nice video. Thing starts becoming tricky when we must deal with entering numbers in TextField. Could be great to have a lesson on this.
@seanallen
@seanallen 3 года назад
Oh yeah, there are many variations in which you can take this form that presents all new topics to discuss. I wanted to keep this basic as a starting point for forms.
@faengelm
@faengelm Год назад
Very useful.
@seanallen
@seanallen Год назад
Glad it was helpful, Frank.
@esraagamal2598
@esraagamal2598 Год назад
Hey Sean, It would be great if u made a part2 video to show how to validate TextField inside a form so it shows if the content is valid like if it is a valid email or valid number of characters
@Jake-bh1hm
@Jake-bh1hm 3 года назад
Sweet! Thanks
@seanallen
@seanallen 3 года назад
Happy to help, Tom.
@ssaguiar
@ssaguiar 4 месяца назад
Excellent.
@seanallen
@seanallen 4 месяца назад
Glad you liked it!
@WilfriedJosset
@WilfriedJosset 3 года назад
@seanallen amazing content like always! How can you go to next text field when tapping the return button? I had to create my own UIViewRepresentable UIKit text field for that. Also, the fact that we cannot decide which event should not be canceled by adding a tap gesture over it is really lacking to SwiftUI (setting a tap priority would be great). Hopefully next WWDC we will see that 🙏🏻😅
@w0mblemania
@w0mblemania 3 года назад
Yeah, it's a complete oversight on Apple's part. Hopefully we'll see it fixed in SwiftUI 3.0 soon, but of course, that will require iOS 15.
@mansapratapsingh417
@mansapratapsingh417 3 года назад
You7good Sean. Keep doing good 👍 work 👏.
@seanallen
@seanallen 3 года назад
Will do!
@samha1513
@samha1513 3 года назад
Fire tuts
@seanallen
@seanallen 3 года назад
Thanks Sam.
@jwoodywoodward12
@jwoodywoodward12 3 года назад
Great video! Just wondered if you were doing this with a firebase database, how would you save the details entered into the form? Thank you!
@seanallen
@seanallen 3 года назад
I can't help much here as I've never used Firebase. All the apps I've worked on have had a custom built backend for them.
@Iberousa
@Iberousa 2 года назад
Hi Sean! first of all, Thank you for your Videos. I followed your steps on Xcode 13 and the very new macOS Big Sur 11.6 and neither on the preview of the Xcode nor in the simulator the keyboard pop up to use it. Any suggestions Allen, anyone?
@matthewogiji6428
@matthewogiji6428 3 года назад
Hi Sean Allen! Could you tell me how you capture yourself speaking on your screen while recording the screen?
@michelcusson2673
@michelcusson2673 2 года назад
why I don't see the file info.plist on my project . You are a great teacher. Thank you!
@HolographicKode
@HolographicKode Год назад
Can rthe dismiss keyboard icon be added to the keyboard modal view itself? You only need to show this icon/button when the keyboard is shown.
@vaibhavagarwal170
@vaibhavagarwal170 3 года назад
I want to design list of cards detail and after selecting any particular card want to display a textfeild inside that row. Can you please share any video for that
@a4advanture755
@a4advanture755 3 года назад
super video
@MarvelousLXVII
@MarvelousLXVII 3 года назад
Sean, can you have a blank value in the date field? You have it as a birthday but it defaults to "todays" date and if you don't know the person's bday, it will have it wrong.
@mbarake9921
@mbarake9921 3 года назад
How do you change the white background in the form. I was able to change the foreground but not the background
@argenistherose
@argenistherose 3 года назад
hey man, would really like to see you post a file with the source code on it. much appreciated. keep on with the great content.
@maartenborsje
@maartenborsje Год назад
How to make an edit text view? So for example you filled in this form but you want to edit it. It would be nice if the text you already wrote is there to be edited.
@techandbeauty22
@techandbeauty22 2 года назад
how do you get the information put in this form sent to like a list in another view? I'm trying to create an inventory form. For example: I have 10 brown boots, 6 red heels, 2 sundresses, 3 black purses. How would I make the stepper count it and then send it to another screen that would show that information in a list style?
@Wolckie
@Wolckie 6 месяцев назад
Can you place the “if” from the toggle in another file so it’s showed in another view?
@olatunjigabriel2707
@olatunjigabriel2707 2 года назад
what version of xcode and swift do you used for this tutorial
@rax7838
@rax7838 Год назад
1:44 is it possible to create that 2 different textfield that in 1 group with UIKit or its just possible with SwiftUI?
@nsmofficial_
@nsmofficial_ Год назад
is there a way to save the data even after the application is closed
@noobmaster3k
@noobmaster3k 3 года назад
How can we archive the exact same result using swift?
@razrbhr8888
@razrbhr8888 3 года назад
Really awesome ! however i have one question i noticed that when the Datepicker is activated and i select a date on Simulator the datepicker does not dismiss unless i tap outside. Is it a default IOS Behaviour ? thanks
@seanallen
@seanallen 3 года назад
That is the default behavior for the new datepicker in iOS 14.
@omarmehrez3363
@omarmehrez3363 2 года назад
how can I send the input to an email by clicking on a button?
@karljay7473
@karljay7473 2 года назад
@9:30 update: the bug is still there. I'm fully updated Sep-2021 and the bug is still alive and well :D
@ivanc.5330
@ivanc.5330 Год назад
What's that xcode theme?
@brandontyler9278
@brandontyler9278 3 года назад
From zero programming knowledge to learning swift how long would it take? Assuming you have like an hour a day to learn?
@w0mblemania
@w0mblemania 3 года назад
It's a tricky question, a bit like asking "how long until I can play the piano?". You could learn the C major scale in a day, but may not be able to play "Twinkle, Twinkle, Little Star" for a month. Or a year. You could learn to write a small, very simple app within a week. It will probably have bugs, and won't do much, but it will be a start. You then repeat the process, building on your skills each time, producing more advanced apps. In the meantime, the technology will change. Sometimes radically. e.g. SwiftUI. You will have to adapt. You will make any mistakes, big and small. Your job is to learn from those mistakes, and learn how to learn effectively. But there will never be a time where you don't make mistakes. Instead, you will learn how to overcome them and move on. Like playing the piano. Good luck. You can do it, if you apply yourself consistently. Like playing the piano.
@AZMerf
@AZMerf 3 года назад
This is exactly where I am. I was a developer about 15 years ago. My plan is to spend 200 hours learning before I can evaluate how long this will take and my ability to pick it up. I am 100 hours in and not feeling confident yet. LOL
@muhammadsalih7133
@muhammadsalih7133 2 года назад
Button - hideKeyboard doesn't work on mine for some reason :/
@zanahid
@zanahid 3 года назад
Code for the keyboard #if canImport(UIKit) extension View { func hideKeyboard() { UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) } } #endif
@seanallen
@seanallen 3 года назад
Thanks for sharing!
@tayamirai3400
@tayamirai3400 Год назад
Hey Sean, how can i talk to you 1 to 1?
@prakashbist11
@prakashbist11 3 года назад
Looks like "RED" is your fav colour Sean.
@seanallen
@seanallen 3 года назад
It's the brand color... I don't really have a favorite color. But there are certain color combos I like, such as black/red.
@namelastname4077
@namelastname4077 2 года назад
SwiftUi is such a p.o.s. technology. Sections especially is a nightmare to work with
@deanhansen9891
@deanhansen9891 2 года назад
Why don't you guys ever explain what you are doing? None of this makes any sense and is impossible to follow.
Далее
SwiftUI List with Custom Cell & Passing Data
36:27
Просмотров 115 тыс.
NCT DOJAEJUNG 엔시티 도재정 'Perfume' MV
3:07
How to Get User Location on a Map - Swift
26:11
Просмотров 62 тыс.
1. SwiftData CRUD Operations
42:40
Просмотров 23 тыс.
Your App Will Get Rejected | New Privacy Rules - 2024
11:26
WWDC23: Beyond scroll views | Apple
14:47
Просмотров 31 тыс.
Validating Form in SwiftUI Using MV State Pattern
12:27
WWDC24: Demystify SwiftUI containers | Apple
18:13
Просмотров 6 тыс.
Самые бесчеловечные люди..
0:48
Просмотров 346 тыс.
헤드레스트 거치대
0:14
Просмотров 11 млн
Популярное из Тик Ток (75 часть)
11:01