ios 9 objective-c屏幕尺寸问题
我升级到ios 9和xcode 7(来自xcode 6.2),现在,当我启动我的应用程序时,会发生这种情况:
现在上面和下面都有这些黑条。
我的appDelegate是这样的:
- (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; }
大小写缺less应用程序图标下的常规设置中的LaunchScreen.storyboard并启动图像:
以上function不工作检查按照以下步骤:
- 导航到项目设置
- 在“应用程序图标和启动图像”下点击“使用资产目录”
- 在出现的popup窗口中select“Migrate”。
这应该解决这个问题。
首先请将这些图像添加到Images.xcassets目录中。 你也可以改变这些图像,但要小心保持大小和标题:)
用他们的头衔命名。 为Default.png
默认568h.png
然后在常规selectLaunchImage:应用程序图标和启动图像:启动图像源
检查您的项目是否有LaunchScreen.storyboard
文件。 如果没有这个,Xcode会对你的屏幕大小做一个假设。 创build一个LaunchScreen.storyboard
文件并将其添加到您的项目。
如果您不想添加任何启animation面,如果它不提供任何目的,如在这种情况下是白色或黑色,您可以简单地添加launchScreen.xib并select它启动屏幕文件选项目标设置。
- popup里面的ios 7图像select器错误的行为
- 在另一个UIViewController中embeddedUIViewController视图
- iOS以编程方式显示基于当前用户的视图控制器
- 检测圆上的触点,Cocos2d
- 目标c如何设置整个应用程序的所有UIbutton的独家触摸
- 如何在startWithGraphPath Facebook iOS中标记好友
- 是否有可能只使用C + +的iPhone应用程序?
- MonoTouch.Foundation.MonoTouchException已经抛出了Objective-Cexception。 名称:NSInternalInconsistencyException
- 如何在对象属性上使用谓词过滤NSArray