Setting
Setting copied to clipboard
Navigate to UIKit
Let's say I had an existing UIViewController in my current settings that i don't want to recreate in SwiftUI, what's the best way of continuing to use it within this framework?
I've made a UIViewControllerRepresentable View and used it within a SettingCustomView, but it doesn't look like it sizes correctly e.g. has a 0 height, 0 width frame unless i set one manually. If i have to do that, is there a way to get the right height?
(ps. sorry for creating so many issues 🥺)
struct LibrarySectionsView: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> LibrarySectionOrderViewController {
return LibrarySectionOrderViewController()
}
func updateUIViewController(_ uiViewController: LibrarySectionOrderViewController, context: Context) { }
}
SettingPage(title: "Library Sections") {
SettingCustomView {
LibrarySectionsView()
}
}
This is kind of tough to do right now — I recommend just showing it in a new .sheet
.
Once #23 gets implemented it will be a lot easier, but I need some help on that :)