新建一個去除storyboard的項目

新建一個去除storyboard的項目app

 

1. 新建項目並刪除 *.storyboard 以及與之相關的雜項測試

 

2. 設置 UIWindow 的 rootViewControllerspa

複製粘貼代碼以下code

    self.window                    = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor    = [UIColor whiteColor];
    self.window.rootViewController = [ViewController new];
    [self.window makeKeyAndVisible];

 

3. 新建pch文件blog

 

複製粘貼的代碼it

/*-------------------------------------------------
 * $(SRCROOT)/$(PROJECT_NAME)/YourProjectName.pch *
 -------------------------------------------------*/

#import <Availability.h>

#ifndef __IPHONE_4_0

#warning "This project uses features only available in iOS SDK 4.0 and later."

#endif

#ifdef __OBJC__

/* Add your header file here. */

#endif

 

4. 添加支持app圖標以及啓動頁(請在真機上測試啓動頁顯示問題)class

 

5. 設置相關圖標支持並去除警告信息import

 

*6 一些細節file

相關文章
相關標籤/搜索