I am trying to load a UIStoryboard from the app delegate .m in this way:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDi
From your code I see UIWindow object is not initialised.
You need to initialise it if you don't mention any Storyboard Name in App-Info.plist
.
Also, make the Window key and visible. Please change your code as displayed below:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIStoryboard *storybord = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]];
UIViewController *vc =[storybord instantiateInitialViewController];
[self.window addSubview:vc.view];
[self.window makeKeyAndVisible];
return YES;
}