iphone - Dimiss two ViewControllers one after the another:iOS -


i trying dismiss 2 view controllers 1 after another, in first view controller have kept uploading feature, when completes current view controller dismissed.

now, after uploading viewcontroller dismissed,i come previous viewcontroller. want dismiss "previousviewcontroller" well.

after "uploadviewcontroller" dismissed, call method on "previousviewcontroller"

here how trying it:

in uploadviewcontroller:

[self dismissviewcontrolleranimated:yes completion:^{              [previousview dismissme];         }]; 

and when come "previousviewcontroller"

here dismissme method:

-(void)dismissme {      if (![[self presentingviewcontroller] isbeingdismissed]) {         nslog(@"dismiss me");         [self dismissviewcontrolleranimated:yes completion:null];     } } 

i "dismiss me" log, viewcontroller not being dismissed.

any ideas .. ? how achieve ..?

this code helps in dismissing previous 2 viewcontrollers.

[[[self presentingviewcontroller] presentingviewcontroller] dismissmodalviewcontrolleranimated:yes]; 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -