Skip to content

Instantly share code, notes, and snippets.

@naan
Created March 21, 2011 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naan/878834 to your computer and use it in GitHub Desktop.
Save naan/878834 to your computer and use it in GitHub Desktop.
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
UINavigationController* nav = (UINavigationController*)viewController;
UIViewController *c = nav.topViewController;
if ([c respondsToSelector:@selector(scrollToFirstUnread:)]) {
[c performSelector:@selector(scrollToFirstUnread:) withObject:nil];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment