Last active
January 18, 2020 03:51
-
-
Save badrinathvm/c8f478b3ca5467fcc407cdf2bf70b962 to your computer and use it in GitHub Desktop.
This file contains 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
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let swiftUIView = UIHostingController(rootView: SwiftUIView()) | |
swiftUIView.view.translatesAutoresizingMaskIntoConstraints = false | |
self.addSubview(swiftUIView.view) | |
swiftUIView.view.layout { | |
$0.top == self.view.topAnchor | |
$0.leading == self.view.leadingAnchor | |
$0.trailing == self.view.trailingAnchor | |
$0.bottom == self.view.bottomAnchor | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment