An open API service indexing awesome lists of open source software.

https://github.com/chicio/use-uikit-in-swiftui

An example of UIViewRepresentable and UIViewControllerRepresentable create for my blog post "Use UIKit components in SwiftUI: UIViewControllerRepresentable and UIViewRepresentable" :iphone::baby_chick:
https://github.com/chicio/use-uikit-in-swiftui

Last synced: about 1 year ago
JSON representation

An example of UIViewRepresentable and UIViewControllerRepresentable create for my blog post "Use UIKit components in SwiftUI: UIViewControllerRepresentable and UIViewRepresentable" :iphone::baby_chick:

Awesome Lists containing this project

README

          

# Use UIKit In SwiftUI

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/chicio/Use-UIKit-In-SwiftUI/master/LICENSE.md)
[![Supported platform](https://img.shields.io/badge/platforms-iOS-orange.svg)](https://img.shields.io/badge/platforms-iOS-orange.svg)

A sample project for my blog post post [Use UIKit components in SwiftUI: UIViewControllerRepresentable and UIViewRepresentable](https://www.fabrizioduroni.it/2020/07/02/expose-uikit-to-swiftui/), where I show
how you can use UIKit based components inside a SwiftUI project.

### Description

This is a quote from the post:

> ... But as a consequence of the fact that UIKit has been with us [for almost twelve years](https://en.wikipedia.org/wiki/IOS_SDK) and there are millions of apps already publish on the app store, a lot of developers have tons of UKit based library and custom components. Another interesting point is the fact that at the moment of this writing a lot of UIKit components from the iOS SDK are [missing a counterpart in SwiftUI](https://www.hackingwithswift.com/quick-start/swiftui/answering-the-big-question-should-you-learn-swiftui-uikit-or-both "uikit missing swiftui").
Anyway, you are just starting to develop a new app and you want to create it in SwiftUI (targeting only for iOS 13 because, you know, SwiftUI is compatible only with it :laughing:) without losing the ability to speed up you development by reusing your UIKit based libraries and components. Is there a solution to this problem? Yes!! :relaxed:
In this post I will show you how you can leverage the power of `UIViewRepresentable` and `UIViewControllerRepresentable` protocols to expose your UIKit views and controller as standard SwiftUI components...

Click on the link above to read the posts.