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...

enter image description here

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 .. enter image description here]3 [enter image description here][4 enter image description here

try set property of uiviewcontroller:

enter image description here

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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -