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
Смотрите видео SwiftUI Coordinators: A Bridge to UIKit Delegate Methods онлайн без регистрации, длительностью 28 минут 35 секунд в хорошем hd качестве. Это видео добавил пользователь Swift and Tips 27 Февраль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3 тысяч раз и оно понравилось 98 людям.