Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
I want to change how the storyboard is loaded in my App. I am having immense difficulty. All my searchings through Google has failed.

I am using an Apple Dev Video for guidance 'WWDC 2012 Adopting Storyboards in your App' - which describes how to add a storyboard (in the hope that I can learn more of what little support is out there).

So far: I have removed the storyboard name from 'Main Storyboard' in the 'summary' section of project settings.

I have updated the App delegate as follows:

Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    UIStoryboard *authStoryboard = [UIStoryboard storyboardWithName:@"Authenticate_iPad" bundle:nil];
    UINavigationController *navigationController = [authStoryboard instantiateInitialViewController];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        
    self.window.rootViewController = navigationController;
        
    [self.window makeKeyAndVisible];
    return YES;
}

Error: Could not instantiate NSLayoutConstraint

Any ideas?
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
Quick question, are you building and targeting for iOS 5? If so you need to disable AutoLayout as it is not supported in iOS 5, its only supported in iOS 6. The reason I ask is that you are probably using XCode 4.5.x and when you create a new nib or storyboard autolayout is enabled by default. If you are targeting iOS 5 it will not work.

You can disable auto layout on the storyboard by opening the storyboard and pressing command option 1 which will open the inspector view for the nib/storyboard. About half way down it will have a check box for auto layout. You simply need to uncheck the box.

See image below:
Ios6_enable_disable_autolayout.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.