Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Aha. If you want to display your own splash screen, you should create a special view controller for that, which you already did. I think you can simplify the autorotation query code:</p> <pre><code>- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) foo { return YES; // all interface orientations supported } </code></pre> <p>Now you have to think about the splash screens for different orientations. Do you have a separate splash image for landscape and portrait? If yes, you can do something like this:</p> <pre><code>- (UIView*) startupImageWithOrientation: (UIInterfaceOrientation) io { UIImage *img = [UIImage imageNamed:[NSString stringWithFormat:@"Default-%@.png", UIInterfaceOrientationName(io)]]; UIView *view = [[UIImageView alloc] initWithImage:img]; [view setFrame:[[UIScreen mainScreen] applicationFrame]]; return [view autorelease]; } - (void) loadView { self.view = [self startupImageWithOrientation:self.interfaceOrientation]; } - (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) io duration: (NSTimeInterval) duration { self.view = [self startupImageWithOrientation:io]; self.view.transform = CGAffineTransformFromUIOrientation(io); } </code></pre> <p>There are two utility functions called, you can stuff these into a separate file:</p> <pre><code>NSString *UIInterfaceOrientationName(UIInterfaceOrientation io) { return UIInterfaceOrientationIsPortrait(io) ? @"Portrait" : @"Landscape"; } CGAffineTransform CGAffineTransformFromUIOrientation(UIInterfaceOrientation io) { assert(io &lt;= 4); // unknown, portrait, portrait u/d, landscape L, landscape R static float angles[] = {0, 0, M_PI, M_PI/2, -M_PI/2}; return CGAffineTransformMakeRotation(angles[io]); } </code></pre> <p>It’s a bit messy, I’d be interested in simpler solution myself.</p>
    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.
    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.
    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