xcode6中新建空工程

来源:互联网 发布:电脑重启后软件丢失 编辑:程序博客网 时间:2024/04/30 05:02
升级xcode6之后,直接建立Empty工程后发现,这是太坑,真的是什么都没有啊。只能换个方法了
总结如下:
1.新建一个single view application
2.打开 Info.plist(别告诉我不知道去哪里找info.plist),删除里面的 Launch screen interface file base name以及 Main Main storyboard file base name
3.删除Main.storyboard以及LaunchScreen.xib
4.在AppDelegate.m修改如下
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
// Override point for customization after application launch.
    
self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
    
    
ViewController *vc = [[ViewController alloc]init];
    [
self.window setRootViewController:vc];
    
    [
self.window makeKeyAndVisible];
    
    
return YES;
}

5.然后运行程序,发现在iPhone5s上的程序界面只有iPhone4上得大小了。这都是老问题了,添加图片Default-568h@2x.png。OK,全部搞定。。。
0 0