新建项目后,希望把默认的Main.storyboard和LaunchScreen.storyboard删除,删除后上下出现黑边。
删除Main.storyboard和LaunchScreen.storyboard
1.png删除后改下这两个地方(改为空)
2.pngAppDelegate.m (记得根视图要设置颜色,否则还是黑色)
#import "AppDelegate.h"
#import "ViewController.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.rootViewController = [[ViewController alloc] init];
[self.window makeKeyAndVisible];
return YES;
}
网友评论