Created
March 8, 2020 15:58
-
-
Save RustemAqtau/286fb998ba072b42b2841d534537d159 to your computer and use it in GitHub Desktop.
Canvas Preview for ViewController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ViewControllerProvider: PreviewProvider { | |
static var previews: some View { | |
ContainerView().edgesIgnoringSafeArea(.all) | |
} | |
struct ContainerView:UIViewControllerRepresentable { | |
let viewController = ViewController() | |
func makeUIViewController(context: UIViewControllerRepresentableContext<ViewControllerProvider.ContainerView>) -> ViewController { | |
return viewController | |
} | |
func updateUIViewController(_ uiViewController: ViewController, context: UIViewControllerRepresentableContext<ViewControllerProvider.ContainerView>) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment