I have Navigation interface which I use to pop to setting screen everytime uses presses settings button.
@interface Navigation : UINavigationController
{
}
-(void)popToMainMenuAnimated:(BOOL)animated;
//.m file
-(void)popToMainMenuAnimated:(BOOL)animated
{
UIViewController *element;
for(element in self.viewControllers)
{
if([element isKindOfClass:[MainSettingClass class]]){
self.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:element animated:YES]
}
}
}
App is crashing with below Exception.
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller .' * First throw call stack:
NOTE: This not root screen but 3rd sceen of my application.