0

I am writing an iPhone app using custom UIWindow.(xCode6.1, iOS8.1)

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{
    // Override point for customization after application launch.
    application.statusBarOrientation = UIInterfaceOrientationLandscapeRight;
    CGRect bounds = [[UIScreen mainScreen] bounds];
    _window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, bounds.size.height, bounds.size.width)];
    [_window setBackgroundColor:[UIColor greenColor]];
    [_window makeKeyAndVisible];
    return YES;
}

It targets iPhone, Landscape only. All works fine on all iPhone devices, but when it runs on iPad, the UIWindow frame is broken.

enter image description here

Any advice?

David Rönnqvist
  • 56,267
  • 18
  • 167
  • 205
ttotto
  • 826
  • 3
  • 13
  • 31

0 Answers0