iphone - how to push and pop a view through appdelegate to specific place -


this question exact duplicate of:

i have problem in pop view. pop done when on view popped view buttons action disabled can please me. how can pop , push view specific place in ios. have 5 view controller.

1 view -> 2 view -> 3 view -> 4 view -> 5 view  

and want pop 5 view 2 view through appdelegate?

- (ibaction)btnaddquotes:(id)sender {     libraryvc *obj =[[libraryvc alloc]initwithnibname:@"libraryvc" bundle:nil];     [self.navigationcontroller poptoviewcontroller:obj animated:yes]; } 

if index fixed 2 can

-(void)gotospecificcontroller {     uiviewcontroller *destcontroller = (uiviewcontroller*)[self.navigationcontroller.viewcontrollers objectatindex:2];     [self.navigationcontroller poptoviewcontroller:destcontroller animated:yes]; } 

or can calculate index of destination controller , replace @ objectatindex method.

edit

write code on button click this, write above function in appdelegate , declare appropriately.

-(ibaction)buttonclicked:(id)sender {     appdelegate *appdelegate = (appdelegate*)[[uiapplication sharedapplication] delegate];     [appdelegate gotospecificcontroller]; } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -