thatzprem
thatzprem

Reputation: 4767

How do I create a new project in Xcode5 without using storyboard?

Is there any option available in Xcode5 to create a new project without storyboard enabled?

Upvotes: 3

Views: 210

Answers (3)

kervich
kervich

Reputation: 487

Option 1:

  • Create an empty project.

Option 2:

  • Delete the storyboard file
  • Erase "Main interface" (defaults to "Main") in target settings
  • In app's info.plist remove the 'Main storyboard file name' entry
  • Remove all Storyboard-related stuff from the auto generated app code
  • Instantiate a UIWindow, instantiate and set its rootViewController, etc.
  • Enjoy

Upvotes: 0

Johannes Fahrenkrug
Johannes Fahrenkrug

Reputation: 44740

I wrote a tool that converts Xcode 4's project templates to Xcode 5, so you can once again create projects with or without storyboards. You can find it here on GitHub: https://github.com/jfahrenkrug/Xcode4templates

More information is available in this answer: https://stackoverflow.com/a/19777356/171933

Enjoy!

Upvotes: 1

Divya Bhaloidiya
Divya Bhaloidiya

Reputation: 5064

From here you can get whole idea, its good solution :

xcode 5 - open a project without story board

STEPS FOR REMOVE STORY BOARD

1) Remove Main.storyboard file 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 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;
}

Upvotes: 2

Related Questions