xcode6 建立 empty application

时间:2021-11-25 08:52:11
.新建一个single view application
.打开 Info.plist,删除里面的 Launch screen interface file....以及 Main storyboard file base name...
.删除Main.storyboard以及LaunchScreen.xib
4.打开工程项目属性文件,点击Target下面的第一项,再选择General选项卡,向下找到Use Asset Catalog按钮。点击它。弹出对话框,点击Migrate即可。这样,应用尺寸就能根据屏幕大小进行调整了。
5.在AppDelegate.m修改如下(其中MainViewController是自己新建的 viewController) - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds] ];
self.window.rootViewController = [[MainViewController alloc]init];
[self.window makeKeyAndVisible];
return YES;
}