Hello guys, welcome to another video! Today we'll continue with UIViewRepresentable. This time showing a more complex example of wrapping UITextField to create a pin code field. To do that, we will require some delegate methods that will be executed through a coordinator object. Also explaining why we have a context parameter in the UIViewRepresentable methods.
If you haven't seen part 1, check this out:
Content:
0:00 - Intro
0:37 - The pin code field we want to develop
1:14 - Reviewing LoginBankView
2:06 - Creating PinCodeField through UIViewRepresentable
3:57 - Adding style to UITextField
8:18 - Create a coordinator to validate PinCodeField
13:13 - Using UITextFieldDelegate to validate characters
16:57 - Fix issue with delegate
17:53 - Show MainBankView typing the valid code
23:02 - Refactor using a view model
25:24 - Summary
27:42 - Ending
Source:
-
-
Source code showed in the video:
Other videos in the channel:
- State management in SwiftUI:
- Widgets in iOS:
Don't forget to subscribe to the channel, like it, and follow me on social media:
Twitter:
Finally, ask me for a video you would like to see next !
Credits:
- Music by Wataboi from
- Video edited with LumaFusion
Watch video SwiftUI Coordinators: A Bridge to UIKit Delegate Methods online without registration, duration 28 minute 35 second in high hd quality. This video was added by user Swift and Tips 27 February 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3 thousand once and liked it 98 people.