Maybe your ios app have a Login ViewController just before a TabBarController, and you want the TabBarController appear after login Success :)
Doing this by:
let nextVC = self.storyboard?.instantiateViewController(withIdentifier: "Home") as! HomeViewController
nextVC.modalPresentationStyle = .fullScreen
self.present(nextVC, animated: true, completion: nil)
The result is TabBarItem not appearing in the HomeViewController :(
You can avoid this by creating a UITabBarController files and assign this at UITabBarController, and point at this instead of HomeViewController
let nextVC = self.storyboard?.instantiateViewController(withIdentifier: "tabBar") as! TabBar
nextVC.modalPresentationStyle = .fullScreen
self.present(nextVC, animated: true, completion: nil)
And the result is the TabBarIter are showed correctly 🥳🥳🥳
Top comments (0)