I have a UIViewController with this method:
-(void)prepareToShowVault {
...
UINavigationController *passcodeNavigationController = [[UINavigationController alloc] initWithRootViewController:passcodeViewController];
[self.navigationController presentModalViewController:passcodeNavigationController animated:YES];
[passcodeViewController release];
[passcodeNavigationController release];
}
When called from another method in this UIViewController, it works just fine. But when called from another UIViewController, this method fires but the code doesn’t display a new modalViewController, presumably because the UIViewController with the above method isn’t active. How can i make this work?
In the UIViewController docs it says
modalViewController
So I would guess that unless your view controller is the active one you will not see the modal view that it presents.
Therefore you need to either be in that view controller or add the method to the other view controller as well possibly using a category that you add to both.