Hi all, i need some advice on how to load ViewController.m file in didReceiveRemoteNotification function with Xcode 4.2 story board. Previously i was able to do so using xib files but recently i changed my project to StoryBoard file and is unable to load ViewController.m again after i receive my remote notification.
I tried using this but failed:
Code:
-(void)application: (UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
for (id key in userInfo){
NSLog(@"key: %@,value: %@", key, [userInfo objectForKey:key]);
}
NSLog(@"Parameter is %@",[userInfo objectForKey:@"acme"]);
param = [userInfo objectForKey:@"acme"];
[self loadUI];
}
-(void)loadUI{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
viewController = [storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
}