user2813740 user2813740 - 28 days ago 5
Objective-C Question

how to display Tab Bar Controller in all UIViewControllers

My iPhone app display Tab-bar with 3 tabs on button Click.
It works fine with initial 3 UIViewControllers.
But when I try to push new UIViewController within any TAB, tab bar disappears.
I even tried other solution mention here http://stackoverflow.com/questions/31087181/tab-bar-controller-is-not-in-all-uiviewcontrollers
However I could only see blank space with no tab bar options...

enter image description here

I tried without navigation pushing UIViewController like normal way. I
also pushing

UIViewController
from Tab bar (having navigation controller for
UIViewController
) but any of ways not giving me desired result.
I do not want two navigation item or pushing new view without tab bar.

All UIViewController's should display within one navigation and Tab bar.

Please help

NOTE: i load TABBar from click of button on home uiviewcontroller like

like

-(IBAction)btnReceivePressed:(id)sender
{
TabBarViewController *about_vc = (TabBarViewController*)[[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"TABBAR"];
[[self navigationController] pushViewController:about_vc animated:YES];
}


below are the screen shot which shows two navigation item ..
enter image description here]3
[enter image description here][4
enter image description here

Answer

Try this for set property of UIViewcontroller:

enter image description here

2 .Another solution for Two NAvigation Bar :

You need to change in appdelgate as below :

From :

 UINavigationController *naController =[[UINavigationController alloc ]initWithRootViewController:self.tabBarController];
  naController.navigationBarHidden = NO;
  self.window.rootViewController = naController;

With :

self.window.rootViewController = self.tabBarController;

3 . If you are use push .

    - (IBAction)btnReceivePressed:(id)sender {
 TabBarViewController about_vc = (TabBarViewController)[[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"TABBAR"]; 
[self navigationController].navigationBarHidden = YES;
[[self navigationController] pushViewController:about_vc animated:YES];
 }