ios 9 objective-c屏幕尺寸问题 [英] ios 9 objective-c screen size issues

查看:337
本文介绍了ios 9 objective-c屏幕尺寸问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级到ios 9和xcode 7(来自xcode 6.2),现在当我启动应用程序时会发生这种情况:

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

现在上面和下面都有这些黑条。

There is now all this black bars above and below.

我的appDelegate是这样的:

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;
}    


推荐答案

案例缺少应用程序图标和启动图像下的常规设置中的LaunchScreen.storyboard

以上功能不起作用请检查以下步骤:

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


  1. 导航到项目设置

  2. 在应用程序图标和启动图像下单击使用资产目录

  3. 在显示的弹出窗口中选择迁移。

这应解决问题。

这篇关于ios 9 objective-c屏幕尺寸问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆