Skip to content

Instantly share code, notes, and snippets.

@kelvinfok
Created April 1, 2023 15:09
Show Gist options
  • Save kelvinfok/e7a46a5141d938d1707619eb550186d0 to your computer and use it in GitHub Desktop.
Save kelvinfok/e7a46a5141d938d1707619eb550186d0 to your computer and use it in GitHub Desktop.
struct HomeViewController_Previews: PreviewProvider {
static var previews: some View {
Container().edgesIgnoringSafeArea(.all)
}
struct Container: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
UINavigationController(rootViewController: HomeViewController())
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
typealias UIViewControllerType = UIViewController
}
}
@kelvinfok
Copy link
Author

remember to import SwiftUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment