objective c - Hide navigation bar -
i have 3 views. (say 1st,2nd,3rd). have pushed 2nd view (which has load view method) on 1st. in 2nd view have created 3rd using initwithframe
(which inherited uiwebview). in 2nd view wrote self.view=3rd view.
now want hide 2nd view's navigation bar in 3rd view (i.e., when user touch 3rd view screen i.e. uiwebview). got touch recognition using gesture, can't hide navigation bar.
3rd view don't support self.navigationcontroller
. , if create 2nd view's object in 3rd, not hide navigation bar. can me?
ok. need set navigation bar hidden right after create navigation controller tab. cannot adjust after push view controller (as far know).
if want first view not have navigation bar @ top, use in appdelegate declare navigation controllers:
localnavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:theviewcontroller]; [localnavigationcontroller setnavigationbarhidden:yes animated:yes];
if want views after hidden, need viewcontroller subsequent views, , have add
[[self navigationcontroller] setnavigationbarhidden:yes animated:yes];
right before call this:
[[self navigationcontroller] pushviewcontroller:thethirdviewcontroller animated:yes];
hope helps.
Comments
Post a Comment