UIStoryboard load from app delegate

Posted by Alessandro on Stack Overflow See other posts from Stack Overflow or by Alessandro
Published on 2012-09-23T15:32:43Z Indexed on 2012/09/23 15:37 UTC
Read the original article Hit count: 187

Filed under:
|

I am trying to load a UIStoryboard from the app delegate .m in this way:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

UIStoryboard *storybord = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]];
UIViewController *vc =[storybord instantiateInitialViewController];
[self.window addSubview:vc.view];

return YES;
}

What is the problem with this code?? any idea?

© Stack Overflow or respective owner

Related posts about ios

Related posts about xcode