1、创建一个single View application
Xcode 6.1中空工程是什么都没有,完全的空工程,所以还是要在single View application工程的基础上自己修改
2、删除工程中的Main.storyboard和LaunchScreen.xib
LaunchScreen.xib是启动画面,使用需要考虑屏幕适配问题。
3、在工程的info.plist中删除配置信息
删除里面的 Launch screen interface file base name以及 Main Main storyboard file base name。
ps:不删除启动画面的可以在工程targets中的Deployment Info设置Main Interface为空。
4、修改AppDelegate.m
在AppDelegate.m修改如下方法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
改为:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen] bounds]];
ViewController * viewController = [[ViewController alloc]init];
self.window.rootViewController = viewController;
[self.window makeKeyAndVisible];
// Override point for customization after application launch.
return YES;
}
5添加图片Default-568h@2x.png
在工程中添加这个图片可以去掉iphone5s只有iphone4大小的问题。