SwiftUI Coordinators: A Bridge to UIKit Delegate Methods

Published: 01 January 1970
on channel: Swift and Tips
3,349
101

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:    • Using UIKit components in SwiftUI (UI...  

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:
https://developer.apple.com/documenta...
https://developer.apple.com/tutorials...


Source code showed in the video: https://github.com/pitt500/swift-and-...

Other videos in the channel:
State management in SwiftUI:    • State Management in SwiftUI  
Widgets in iOS:    • Creating iOS Widgets with WidgetKit a...  

Don't forget to subscribe to the channel, like it, and follow me on social media:

Twitter:
  / swiftandtips  
  / pitt500  

Finally, ask me for a video you would like to see next 😄!

Credits:
Music by Wataboi from https://pixabay.com/
Video edited with LumaFusion


Watch video SwiftUI Coordinators: A Bridge to UIKit Delegate Methods online without registration, duration hours minute second in high quality. This video was added by user Swift and Tips 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,349 once and liked it 101 people.