Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Base on the debug log you gave I got a reason by searching:<br> <strong><code>MainSettingClass</code> instance that you pushed before can neither be repushed to the array on navigationController again, nor be presented modally. You should create a new MainSettingClass instance and present it, just like the second code snippet.</strong> </p> <p><a href="https://stackoverflow.com/questions/7429014/application-tried-to-present-modally-an-active-controller">HERE</a> is a relate question that mentioned <code>Application tried to present modally an active controller</code>. :)</p> <pre><code>-(void)popToMainMenuAnimated:(BOOL)animated { UIViewController *element; for(element in self.viewControllers) { if([element isKindOfClass:[MainSettingClass class]]) { self.modalTransitionStyle = UIModalTransitionStylePartialCurl; [self presentModalViewController:element animated:YES]; break; } } } </code></pre> <p>But why not <code>load</code> the <code>Main Menu</code> instead of <code>pop</code>?</p> <pre><code>-(void)loadMainMenuAnimated:(BOOL)animated { MainSettingClass * mainMenuViewController = [[[MainSettingClass alloc] init] autoreleased]; [mainMenuViewController.view setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)]; // ... self.modalTransitionStyle = UIModalTransitionStylePartialCurl; [self presentModalViewController:mainMenuViewController animated:YES]; } </code></pre> <hr> <p>And the code you show has some mistakes:</p> <pre><code>self.modalTransitionStyle= UIModalTransitionStylePartialCurl; [self popToViewController:element animated:YES]; </code></pre> <p><code>self.modalTransitionStyle= UIModalTransitionStylePartialCurl;</code> if you set this one, you need use</p> <pre><code>[self presentModalViewController:yourViewController animated:YES]; </code></pre> <p>not </p> <pre><code>[self popToViewController:element animated:YES]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload