Note that there are some explanatory texts on larger screens.

plurals
  1. POdismissing modalViewController of modalViewController
    primarykey
    data
    text
    <p>So I have a UITabBarController app and I want to display a login page, and so I did:</p> <pre><code> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(userDidLogin:) name:UserDidLoginNotification object:nil]; LoginViewController* loginViewController = [[LoginViewController alloc] init]; self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:0]; [self.tabBarController.selectedViewController presentModalViewController:loginViewController animated:NO]; [loginViewController release]; </code></pre> <p>Inside my LoginViewController I can as well show another modalViewController:</p> <pre><code>- (void) twitterLogin: (UIViewController *) askingView { UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _twitter delegate: self]; if (controller) { self.askingView = askingView; [askingView presentModalViewController: controller animated: YES]; } } </code></pre> <p>I have the following method where the askingView is the LoginViewController, when I want to dismiss this I do:</p> <pre><code>[self.askingView dismissModalViewControllerAnimated:YES]; [[NSNotificationCenter defaultCenter] postNotificationName:UserDidLoginNotification object:nil]; </code></pre> <p>However, this doesn't dismiss the LoginViewController and show the UITabBarController views.. it just dismisses my modalViewController shown from the LoginvVIewController. What am I doing wrong here? I am also getting the following error:</p> <pre><code>attempt to dismiss modal view controller whose view does not currently appear. self = &lt;LoginViewController: 0x2aff70&gt; modalViewController = &lt;SA_OAuthTwitterController: 0x2d2a80&gt; 2011-09-16 09:45:37.750 VoteBooth[4614:707] attempt to dismiss modal view controller whose view does not currently appear. self = &lt;MainViewController: 0x29fec0&gt; modalViewController = &lt;LoginViewController: 0x2aff70&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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