Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

ios 9 objective-c screen size issues

I upgrade to ios 9 and xcode 7 (from xcode 6.2) and now this happens when I start my app:

enter image description here

There is now all this black bars above and below.

My appDelegate is like so:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    // Override point for customization after application launch.
    // self.window.backgroundColor = [UIColor whiteColor];
    // [self.window makeKeyAndVisible];



    _startViewController = [[StartViewController alloc] init];
    _startNavigationController = [[StartNavigationController alloc] initWithRootViewController:_startViewController];
    self.window.rootViewController = _startNavigationController;
    [self.window makeKeyAndVisible];

    // Need to fix this since deprecated
    // [application prefersStatusBarHidden:NO];
    // [application preferredS :UIStatusBarStyleDefault];

    // [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

    return YES;
}    
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

case was missing the LaunchScreen.storyboard in General setting under App icons and launch images:

enter image description here

above function is not work check the follow the below steps:

  1. Navigate to project settings
  2. Under "App Icons and Launch Images" click on "Use Asset Catalog"
  3. Select "Migrate" on the popup that appears.

This should fix the issue.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...