Created
March 11, 2021 09:55
-
-
Save iamidzic/642b9990597ec016db8487391db080f7 to your computer and use it in GitHub Desktop.
HostingViewController example
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
import SwiftUI | |
class SettingsViewController: UIHostingController<SettingsView> { | |
override init(rootView: SettingsView) { | |
super.init(rootView: rootView) | |
tabBarItem = UITabBarItem(title: "Settings", image: UIImage(systemName: "gearshape"), selectedImage: UIImage(systemName: "gearshape.fill")) | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment