Reputation: 743
Tab bar controller storyboard:
This is how I call that tab bar:
let tabBar = TabBarController()
tabBar.modalPresentationStyle = .fullScreen
self.present(tabBar, animated: true, completion: nil)
But result:
What's wrong?
Upvotes: 0
Views: 97
Reputation: 126
Having segues inside the tab bar controller won't show the tab bar. So don't add segues in the tab bar.
Upvotes: 0
Reputation: 606
You are presenting the TabBarController(), but you have to instance using storyboard, because your view is created using storyboard.
let storyboard = UIStoryboard(name: "filenamethatcontaineyourtabBar", bundle: nil)
let vc = storyboard.instantiateViewController(identifier: "storyboardIdOfYourTabBarController")
self.present(vc, animated: true, completion: nil)
Upvotes: 1
Reputation: 4235
If this is the first screen of your app, you don't need to present it. The first tab will appear automatically. You don't need a custom TabBarController class.
Upvotes: 1