I'm avoiding using NIBs completely. I'm getting problems on iOS 7.1, but not on iOS 8.x.
iOS 7 vs. iOS 8
The code looks like this in the UIResponder <UIApplicationDelegate>
- (void) setupViewController {
CGRect frame = UIScreen.mainScreen.bounds;
self.window = [[UIWindow alloc] initWithFrame:frame];
self.window.backgroundColor = UIColor.whiteColor; // viewController's view is green
ViewController *viewController = [[ViewController alloc] init];
UIView *view = [[UIView alloc] initWithFrame:self.window.bounds];
viewController.view = view;
self.window.rootViewController = viewController;
[self.window makeKeyAndVisible];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self setupViewController];
return YES;
}
I've also tried some methods dealing with iOS 8, but even settings the UIWindow
frame
to 5000, 5000
produces the same results.
[I've seen a number of related questions and tried out the suggestions, but to no avail, including flipping the bounds if it's iOS 8, etc. etc.]
The problem is that you don't have a launch image for the 4-inch screen, so the iPhone 5s is treating this app as a 3.5-inch app (iPhone 4) and letterboxing it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With