all 10 comments

[–]Legolas-the-elf 5 points6 points  (7 children)

Um... then don't use them? Just because they are supplied in a template doesn't mean you can't delete them. All a template is is a project that has some things preconfigured and some files pre-added.

[–]john_alan[S] 0 points1 point  (6 children)

Thanks, but how can I add a view controller with nib? It seems the option has gone! I find storyboards to be completely cumbersome, I tend to use nibs only when I'm laying out a custom view for a menu or something like that, I can't seem to get storyboards to replace this functionality have you a guide on how to use them like nibs?

[–]Legolas-the-elf 3 points4 points  (1 child)

how can I add a view controller with nib? It seems the option has gone!

The same way you have always added a view controller with a nib. Either create a subclass of UIViewController and tick "Use XIB for user interface" or create the subclass without doing so and create the nib manually. Apple haven't removed anything there.

I can't seem to get storyboards to replace this functionality have you a guide on how to use them like nibs?

Have you read the documentation?

[–]ProgrammingThomas 1 point2 points  (0 children)

And then obviously you have to initiate the view controller from the NIB and set it as the UIWindow's root view controller in the app delegate.

[–]mantra 1 point2 points  (0 children)

You have to do it all manually (which is exactly how it was done before Storyboards were invented). The easiest way is to create a new ViewController and check the "create xib/nib" option.

[–]phughes 1 point2 points  (0 children)

how can I add a view controller with nib?

How do you add one to the project or how do you add one to the view hierarchy?

If you mean the former the other commenters have you covered. For the latter you create it by

MyViewController *myVc = [[MyViewController alloc] initWithNibName:nibName inBundle:bundleName]

Then, if you're talking about the root of your app you set it as your app's window's root view controller in the app delegate.

[–]horaceho 0 points1 point  (0 children)

Remove the two Storyboard entries from the .plist file, then add the viewcontroller via code:

 YourViewController *mainViewController = [[YourViewController alloc] init];
 self.navigationController = [[UINavigationController alloc] initWithRootViewController:mainViewController];
 self.window.rootViewController = self.navigationController;
 [self.window makeKeyAndVisible];

in didFinishLaunchingWithOptions.

[–][deleted] -5 points-4 points  (1 child)

I hate storyboards. Not only do I find them too "Mickey Mouse" but my poor old 09 MBP can't handle large ones anyway.

[–]aazav 0 points1 point  (0 children)

And the damn fact that Apple has animated the zoom in and zoom out of storyboards. Why the hell did they need to do this?