UITabBar not showing
Alberto Giambone
Posted on July 19, 2022
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 🥳🥳🥳
💖 💪 🙅 🚩
Alberto Giambone
Posted on July 19, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.