[英]XCode 6 UIViewController not resizing to fill screen
I'm creating an app without Storyboard on XCode 6.4 and when I run the app, no matter which simulator I use, I always get a (320,480)
screen. 我在XCode 6.4上创建了没有Storyboard的应用程序,当我运行该应用程序时,无论使用哪种模拟器,我总会得到一个
(320,480)
屏幕。
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *vc = [[UIViewController alloc] init];
vc.view.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = vc;
[self.window makeKeyAndVisible];
return YES;
}
Ref img: http://i.stack.imgur.com/hGHmt.png 参考img: http : //i.stack.imgur.com/hGHmt.png
Already tryed: 已经尝试过:
vc.view.autoresizingMask =
UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
What should I do to make it fill the whole screen? 我应该怎么做才能使其覆盖整个屏幕?
Add launch screen. 添加启动屏幕。 It will be solved.
它将解决。
https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/AddingLaunchImagestoanAssetCatalog.html https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/AddingLaunchImagestoanAssetCatalog.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.