Lecture 14: UIKit Integration

In the final lecture of Stanford’s iOS development course from Spring 2020, we discuss and demonstrate integration with the previous generation of the iOS development environment, UIKit. There is a lot of UIKit code out there in the world and being able to start using SwiftUI while still integrating with that code is crucial. In addition, there are some UIKit APIs that support functionality not (yet) in SwiftUI. After a very bare-bones explanation of how UIKit does some things that are different from SwiftUI (especially delegation), the API in SwiftUI for integrating UIKit code is explained. Two of our existing demos are then enhanced using this mechanism: a map is added to Enroute to show and choose the destination airport and EmojiArt supports using the device’s camera to take a picture to use as its background image.

Leave a Comment