No NIB, UIWindow Not Filling screen, iOS 7

I avoid completely using NIB. I have problems with iOS 7.1, but not on iOS 8.x.

iOS 7 vs. iOS 8

iOS 7iOS 8

The code looks like this: UIResponder <UIApplicationDelegate>

 - (void) setupViewController { CGRect frame = UIScreen.mainScreen.bounds; self.window = [[UIWindow alloc] initWithFrame:frame]; self.window.backgroundColor = UIColor.whiteColor; // viewController 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 also tried some methods of working with iOS 8, but even setting UIWindow frame to 5000, 5000 give the same results.

[I saw a number of related questions and tried out the suggestions, but to no avail, including switching borders, if it's iOS 8, etc. etc.]

+5
source share
1 answer

The problem is that you do not have a launch image for the 4-inch screen, so the iPhone 5s sees this application as a 3.5-inch application (iPhone 4) and a mailbox.

+11
source

Source: https://habr.com/ru/post/1212652/


All Articles