NEW: Get your ticket to Hacking with Swift Live! >>

How do you integrate components from UIKit into SwiftUI?

Recorded – watch the full episode on YouTube.

Right now we can, at least backfill SwiftUI with UIKit components, with AppKit components, with anything else you need from the platform you're working for and designing for. So how do you handle that? How do you approach integrating key things from UIKit with SwiftUI?

Meng To: Again, very limited experience here. What I can say is that during the course, one thing I wanted to do was the background blur, and I know it's not feasible in SwiftUI. So, we had toe use UIViewRepresentable. That was the only thing that I really need the UIKit for the course that I created.

I know also the pagination thing, a lot of people were asking about it, so you would have to use UIKit for that. But hopefully, at WWDC they're going to bring some of those things, the collection view and the background blower, the material sheets. That's on top of my mind right now.

“I want to see collection views desperately, and also I want to see things from other teams as well.”

Paul Hudson: I'm hoping for many, if not all of those things. There are some slightly ones that I worry less about. Like progress views, whatever, but I want to see collection views desperately, and also I want to see things from other teams as well. Because the first time everyone inside Apple has had the chance to see SwiftUI.

If you imagine, 14, 15 months ago when it was still top secret, apart from STS, of course knew about it, but no one else did. We know folks at Apple who are working on MapKit or Safari services, or I know UIImagePickerController, all the other parts of the system that we want integrate regularly. I mean, maps are great. Having Safari embedded is great. Having image picker is great. All those teams have now had a full year to work with SwiftUI and hopefully think “how does my framework fit into SwiftUI world? What would a great map view look like in a SwiftUI world?”

I'm hoping to see lots of UIKit controls coming on board like UIPageControl, which you mentioned, but also stacks of controls from other teams as well.

This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.

Listen on Apple Podcasts

Hacking with Swift is sponsored by Essential Developer

SPONSORED From August 2nd to 8th you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!

Save your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

BUY OUR BOOKS
Buy Pro Swift Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift (Vapor Edition) Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Server-Side Swift (Kitura Edition) Buy Beyond Code

Was this page useful? Let us know!

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.