7

Integrating UIKit & SwiftUI

 3 years ago
source link: https://www.raywenderlich.com/19165608-integrating-uikit-swiftui
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Integrating UIKit & SwiftUIGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupShapeGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroupGroup

This is part of the "iOS User Interfaces with UIKit" learning path. View Path

Integrating UIKit & SwiftUI

Dec 22 2020 · Video Course (25 mins) · Beginner

Learn how to integrate SwiftUI views into your UIKit apps and view hierarchies, and how to host UIKit views and view controllers in SwiftUI. Coordinate data flow from SwiftUI to UIKit and back again!

Version

  • Swift 5.3, iOS 14, Xcode 12

Part 1

An easy way to start using SwiftUI is to add some to your existing UIKit apps! Replace a UIViewController with a SwiftUI view in the storyboard, and manage data flow between SwiftUI and the rest of the app.

You don't have to replace entire view controllers to get started with SwiftUI. You can embed SwiftUI views right into your view hierarchy from the storyboard with the help of @IBSegueAction.

If UIKit has a view or control that you need in your SwiftUI app, you can integrate it with UIViewRepresentable.

SwiftUI doesn't have a native photo picker, so you'll need UIKit's help to pick photos from your app. Learn how to use the new PHPicker in your SwiftUI apps.

SwiftUI doesn't make much use of the delegate pattern, but it's required for many UIKit controls like the PHPicker. Use a coordinator to add the delegates you need to host UIKit views.

The coordinator can help you out with more than delegates! You can also use it to implement target action for UIKit controls in SwiftUI.

Who is this for?

This course finishes up our iOS User Interfaces with UIKit learning path, and is for developers with some experience building iOS apps with UIKit and SwiftUI, as you'll be using both in every episode.

Covered concepts

  • UIHostingController
  • IBSegueAction
  • UIViewRepresentable
  • UIViewControllerRepresentable
  • SwiftUI Coordinator

Contributors

Catie Catterwaul

Catie makes things for, with, and about Apple tech in collaboration with her husband, Jessy! She is inspired by everyone at...

Instructor
Adriana Kutenko

Graphic Illustrator with a Bachelor’s Degree in Fine Arts. I am a perpetual perfection seeker with a big passion for History...

Illustrator

Comments

Add a rating for this content

Sign in to add a rating

All videos. All books.
One low price.

A raywenderlich.com subscription is the best way to learn and master mobile development — plans start at just $19.99/month!

Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.

The largest and most up-to-date collection of courses and books on iOS, Swift, Android, Kotlin, Flutter, Dart, Server-Side Swift, Unity and more!

All videos. All books. One low price.

A raywenderlich.com subscription is the best way to learn and master mobile development — plans start at just $19.99/month!

Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalogue of 50+ books and 4,000+ videos.

  • © 2020 Razeware LLC
  • Made with ♥ from around the world
  • 6000+ Tutorials and counting

raywenderlich.com and our partners use cookies to understand how you use our site and to serve you personalized content and ads. By continuing to use this site, you accept these cookies, our privacy policy and terms of service .


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK