Xcode 6 创建新的项目,不使用自带的storyboard。
(1) 创建一个Single View Application工程,
(2)删除ViewController.h , ViewController.m , 和Main.storyboard
(3) 在AppDelegate.m 中添加代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.window = [[UIWindowalloc] initWithFrame:[[UIScreenmainScreen]bounds]];
self.window.backgroundColor = [UIColorwhiteColor];
[self.windowmakeKeyAndVisible];
return YES;
}
(4)调整屏幕的尺寸,点击General->App Icons and Launch Images -> Launch Images Source , 点击Migrate即可。
(5)Main Interface 改为LaunchScreen。
本文详细介绍了如何在Xcode6中创建一个SingleViewApplication工程,并自定义启动界面,而不依赖于默认的Storyboard。通过调整代码和设置屏幕尺寸,读者可以学习到如何从头开始构建iOS应用的启动流程。
3292

被折叠的 条评论
为什么被折叠?



