您的位置:首页 > 移动开发 > IOS开发

Make iOS project without storyboard

2014-01-23 17:46 253 查看
ref link: http://stackoverflow.com/questions/18932473/xcode-5-open-a-project-without-story-board

1) Remove Main.storyboard file and related view controller files linked to storyboard from your project.

2) Add new files with xib for your controller , if it is not added in compiled sources in build phases then add there manually.

3) Remove 'Main storyboard file base name' and
'Main storyboard file base name ipad' property from plist.

4) Change appdelegate didFinishLaunchingWithOptions file and add :

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;

[self.window makeKeyAndVisible];


just like :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;

// Override point for customization after application launch.

TestViewController *test = [[TestViewController alloc]     initWithNibName:@"TestViewController" bundle:nil];
UINavigationController *nav = [[UINavigationController alloc]  initWithRootViewController:test];
self.window.rootViewController = nav;

[self.window makeKeyAndVisible];

return YES;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: