uiviewcontroller - iPhone - how to find a parent View -


i need find view inside hierarchy.

here how build view stack.

inside first uitableviewcontroller push uiviewcontroller contains uitabbarcontroller:

[[self navigationcontroller] pushviewcontroller:itemvc animated:yes]; 

inside uitabbarcontroller add uitableviewcontroller:

 isstableviewcontroller *graphics = (isstableviewcontroller *)[tabbarcontroller.viewcontrollers objectatindex:3]; 

inside didselectrowatindexpath present modal view controller using uinavigationcontroller:

 graficoviewcontroller *graph = [[graficoviewcontroller alloc] initwithnibname:@"graficoviewcontroller" bundle:nil];   uinavigationcontroller *navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:graph];   [self presentmodalviewcontroller:navigationcontroller animated:yes];       [navigationcontroller release]; 

now (big) question is: have hide nagivationbar of first uitableviewcontroller inside last view. tried this:

 [[[[[self parentviewcontroller] parentviewcontroller] parentviewcontroller] navigationcontroller] setnavigationbarhidden:yes]; 

but doesn't work. can tell me how can find ancestor view??? thanks.

store pointer (as property) uinavigationcontroller in application delegate or custom singleton object. can access navigation place.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -