11

I don't want to use story boards, i'd much rather use NIB's for UI when necessary, and I particularly don't want to use them for the default templates.

Xcode 5 no longer has the check box to say you don't want to use Storyboards,

can anyone help? It's really annoying...

Woodstock
  • 22,184
  • 15
  • 80
  • 118

2 Answers2

31

STEPS FOR REMOVE STORY BOARD - XCode 5 (EDIT)

1/ Create an empty 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.

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;
  }

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;
}

Have a look here

Community
  • 1
  • 1
Jordan Montel
  • 8,227
  • 2
  • 35
  • 40
  • Awesome, will mark as correct when I can in 7 minutes, do you think I should learn storyboards and accept them, will they be forced by Xcode 6? I think they suck, what do you think? - Like if I want to do a custom UIView with custom elements for a little menu I present in my App a nib is so elegant, I can't do a simple UIView based UI with storyboards can I? – Woodstock Sep 27 '13 at 14:02
  • 3
    I'm not using Storyboard and I don't want to use it. A good discussion of that here : http://stackoverflow.com/questions/18903752/best-pratice-between-storyboard-xib-nib-pure-programming – Jordan Montel Sep 27 '13 at 14:03
  • 1
    @JohnWoods for what you mentioned, I use my Storyboard, then add a View where I want my custom control and change the type to my custom control class type. – Toby Sep 27 '13 at 14:05
  • Better create empty project, so you just add Xib file and code, don't need to delete anything – LE SANG Sep 27 '13 at 14:17
2

Use this script to get all the shiny, happy glorious goodness of the Xcode 4 templates back: https://github.com/jfahrenkrug/Xcode4templates

You will need a copy of the Xcode 4 .app bundle to use this script.

Johannes Fahrenkrug
  • 42,912
  • 19
  • 126
  • 165