Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigate to UIKit #13

Open
joekw opened this issue Mar 2, 2023 · 1 comment
Open

Navigate to UIKit #13

joekw opened this issue Mar 2, 2023 · 1 comment
Labels
enhancement New feature or request Generic SettingView Help needed!

Comments

@joekw
Copy link

joekw commented Mar 2, 2023

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()
      }
  }
@aheze
Copy link
Owner

aheze commented Apr 29, 2023

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 aheze added enhancement New feature or request Generic SettingView Help needed! labels Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Generic SettingView Help needed!
Projects
None yet
Development

No branches or pull requests

2 participants