Last active
April 20, 2021 12:14
-
-
Save iamidzic/e1d012cad4fa7fbb7b0eb491129e4acf to your computer and use it in GitHub Desktop.
Present/Push SwiftUI view in VC
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
// Present hostingController | |
let hostingController = UIHostingController(rootView: SettingsView()) | |
present(hostingController, animated: true, completion: nil) | |
// Push hostingController | |
let hostingController = UIHostingController(rootView: SettingsView()) | |
navigationController?.pushViewController(hostingController, animated: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment