Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you were not using a <code>UINavigationController</code> You could put something like this in the view controller that calls the modal view:</p> <pre><code>-(void)dismissModalViewControllerAnimated:(BOOL)animated{ if (_someFlagForBeingProperlyLoggedIn) [super dismissModalViewControllerAnimated:animated]; } </code></pre> <p>When you tap on the page curl the presenting/parent view controller is sent <code>dismissModalViewControllerAnimated:</code>. </p> <p>Since you are using a navigation controller your options are limited. This is because <code>UINavigationController</code> is a subclass of <code>UIViewController</code>, and a self centered one at that. When you click the page curl it's dismissModalViewControllerAnimated: is being called.</p> <p>You still have the option of subclassing <code>UINavigationController</code> and implementing the above method, but that will get messy in a hurry.</p> <p>Having the UIAlertView "direct back" to the modal login view IS very easy. Have that main view conform to the <code>UIAlertViewDelegate</code> protocol. When you display the alert set that instance as the delegate, and in that class implement the method:</p> <pre><code>-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex{ // Enclose in if (buttonIndex == #) for selective calling UINavigationController* nav = (UINavigationController*)[[UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"Preferences"]; [nav setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self.navigationController presentModalViewController:nav animated:YES]; } </code></pre> <p>Then when the alert view is dismissed it will show the 'login' view.</p>
    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