-
纯代码布局,初始化
1.删除Main.storybook
2.删除Targets->Deployment Info->Main Interface->Main
3.在AppDelegate.m文件中添加代码:
-
1.必须导入头文件
#import "ViewController.h"
-
2.初始化UIWindow
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = [[ViewController alloc] init]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; }
-
网友评论