Reputation: 49
I have three UIViewController :A, B, C
I goto B from A
I goto C from B
how can I goBackTo A from C Without through B?
//in a.m
B* b =[B alloc] init];
[self presentModalViewController:b animated:YES];
[b release];
//in b.m
C* c=[C alloc] init];
[self presentModalViewController:c animated YES];
[c release];
Upvotes: 0
Views: 236
Reputation: 3300
I am actually not sure whether this works without a navigation controller. If not, you can dismiss b and c using a delay.
[self popToRootViewControllerAnimated:YES];
EDIT:
As stated below, that won't work. Use [self dismissmodalviewcontroller:animated:]
inside of a delay to do what you want.
Upvotes: 1