ios - how to display Tab Bar Controller in all UIViewControllers -
my iphone app display tab-bar 3 tabs on button click. works fine initial 3 uiviewcontrollers. when try push new uiviewcontroller within tab, tab bar disappears. tried other solution mention here http://stackoverflow.com/questions/31087181/tab-bar-controller-is-not-in-all-uiviewcontrollers see blank space no tab bar options...
i tried without navigation pushing uiviewcontroller normal way. pushing uiviewcontroller
tab bar (having navigation controller uiviewcontroller
) of ways not giving me desired result. not want 2 navigation item or pushing new view without tab bar.
all uiviewcontroller's should display within 1 navigation , tab bar.
please help
note: load tabbar click of button on home uiviewcontroller
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 screen shot shows 2 navigation item .. ]3 [][4
try set property of uiviewcontroller:
another solution 2 navigation bar :
you need change in appdelgate below :
from :
uinavigationcontroller *nacontroller =[[uinavigationcontroller alloc ]initwithrootviewcontroller:self.tabbarcontroller]; nacontroller.navigationbarhidden = no; self.window.rootviewcontroller = nacontroller;
with :
self.window.rootviewcontroller = self.tabbarcontroller;
third solution if 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]; }
Comments
Post a Comment