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

We don't require your email address, or your name, for anyone to leave a comment. If you do add an email address, you may be notified if there are replies to your comment - we won't use it for any other purpose. Please make respectful comments, which add value, and avoid personal attacks on others. Links are not allowed in comments - 99% of spam comments, attempt to post links. Please describe where people may find additional information - for example "visit the UN website" or "search Google for..." rather than posting a link. Comments failing to adhere to these guidelines will not be published.