Skip to content

Instantly share code, notes, and snippets.

@afiq90
Created January 17, 2015 13:35
Show Gist options
  • Save afiq90/b3bc51efe575edae52cf to your computer and use it in GitHub Desktop.
Save afiq90/b3bc51efe575edae52cf to your computer and use it in GitHub Desktop.
DidReceiveRemoteNotification Problem
// Set the view to HotTableViewController when user tapped on remote notification
UIStoryboard *ab = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
HotTableViewController *hotArticle = [ab instantiateViewControllerWithIdentifier:@"hotArticle"];
UITabBarController *tabController = (UITabBarController *)self.window.rootViewController;
// tabController.selectedIndex = 0;
UINavigationController *navigationController = (UINavigationController *)tabController.selectedViewController;
[navigationController pushViewController:hotArticle animated:YES];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment