Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Updated for your situation:</p> <p>Instead have four views:</p> <ol> <li><p>A backing view</p></li> <li><p>The main View</p></li> <li><p>The back view (options pane) 100 pixels</p></li> <li><p>The front view (blank view) 100 pixels</p></li> </ol> <p>Add the main view to the backing view as normal. </p> <p>Add the front view to the backing view where you would like the options pane to appear.</p> <p>make sure the front and back view have the same frame.</p> <p>Use the same code as below using the methods flip the front and back views.</p> <hr> <p>Original Answer</p> <p>You need 3 views:</p> <ol> <li><p>A backing view</p></li> <li><p>The front View</p></li> <li><p>The back view</p></li> </ol> <p>The backing view just holds the other 2 as they flip back and forth Below are the flipping methods. I place them both in backingViewController:</p> <pre><code>- (void)displayBack{ //parent controller is an ivar so the sub-view controllers know who their daddy is backController.parentController = self; [UIView beginAnimations:nil context:@"flipTransitionToBack"]; [UIView setAnimationDuration:1.2]; //note self.view IS the backing view [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES]; //remove the front view [[frontController view] removeFromSuperview]; //add the back view view [self.view addSubview:[backController view]]; [UIView commitAnimations]; //giving a heads up to the view that is about to come on screen [backController viewWillAppear:YES]; } - (void)displayFront{ [UIView beginAnimations:nil context:@"flipTransitionToFront"]; [UIView setAnimationDuration:1.2]; [UIView setAnimationDelegate:self]; //I'm interested in knowing this has happened [UIView setAnimationDidStopSelector:@selector(flipAnimationDidEndWithID:finished:context:)]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; //remove back view [[backController view] removeFromSuperview]; //add the front view [self.view addSubview:[frontController view]]; [UIView commitAnimations]; } </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. 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