Setting icon indicating copy to clipboard operation
Setting copied to clipboard

Navigate to UIKit

Open joekw opened this issue 1 year ago • 1 comments

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()
      }
  }

joekw avatar Mar 02 '23 13:03 joekw

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 :)

aheze avatar Apr 29 '23 05:04 aheze