I have a app which has a tabbar which is presented in most of the ViewControllers
. The problem is its not showing in an viewController
which i'm presenting by this code.
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:songsViewController];
[self presentViewController:navigationController animated:YES completion:nil]
I'm using the presentViewController
instead of the pushViewcontroller
, cause i want to customize the navigationBar
in this view.
How can i present my standard tabbar which i've created using storyboard
?
When you use
presentViewController:animated:completion
, you are presenting the view controller modally, meaning it is not being contained within any of your existing containers like aUITabBarController
or anything like that. So if you want something to show up when you present aUIViewController
modally, it must be contained within the view controller that you're modally presenting. So from the looks of it, you're simply presenting aUINavigationController
with yoursongsViewController
contained within it. If you want to keep yourUITabBar
showing, either you need to add one to the view you're presenting, or you need to change your code so that you're not presenting a view controller modally here. And to add a secondUITabBar
for the modal view that matches theUITabBar
that you were already presenting, it will make your app work rather strangely, so I would suggest trying to change it so you're not having to present a modal view at all.