Scenario:
1. Show navigation controller based view
2. User select option
3. Show modal view A
4. User select another option in modal view A
5. Hide modal view A
6. Show modal view B
// This function must show modal view A
This scenario implemented like this:
- (IBAction)showModalViewA:(id)sender {
ModalViewA *viewA = [[ModalViewA alloc] forParent:self];
[self presentModalViewController:viewA animated:YES];
[viewA release];
}
// This function must hide modal view A and show modal view B
- (void)didSelectOptionInViewA {
ModalViewB *viewB = [[ModalViewB alloc] init];
viewB.peoplePickerDelegate = self;
[self dismissModalViewControllerAnimated:NO]; // Problem Is Here
[self presentModalViewController:viewB animated:YES];
[viewB release];
}
Please look at line marked as // Problem Is Here
When I set the dismissModalViewControllerAnimated:NO it works fine.
If this parameter is YES then viewB did not appear on the screen.
How to make it works with animation?