Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The best thing you can do is to change the frames of your subview frames according to your interface orientations. You can do it like:</p> <pre><code> #pragma mark - #pragma mark InterfaceOrientationMethods - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (UIInterfaceOrientationIsPortrait(interfaceOrientation) || UIInterfaceOrientationIsLandscape(interfaceOrientation)); } //-------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{ [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; if(UIInterfaceOrientationIsPortrait(toInterfaceOrientation)){ //self.view = portraitView; [self changeTheViewToPortrait:YES andDuration:duration]; } else if(UIInterfaceOrientationIsLandscape(toInterfaceOrientation)){ //self.view = landscapeView; [self changeTheViewToPortrait:NO andDuration:duration]; } } //-------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (void) changeTheViewToPortrait:(BOOL)portrait andDuration:(NSTimeInterval)duration{ [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:duration]; if(portrait){ //change the view and subview frames for the portrait view } else{ //change the view and subview frames for the landscape view } [UIView commitAnimations]; } </code></pre> <p>Hope this helps.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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