Skip to content

Instantly share code, notes, and snippets.

@TheCodeEngine
Last active October 11, 2015 01:47
Show Gist options
  • Save TheCodeEngine/3783509 to your computer and use it in GitHub Desktop.
Save TheCodeEngine/3783509 to your computer and use it in GitHub Desktop.
UINavigationBar Double Tap
- (void)viewDidLoad {
UITapGestureRecognizer* tapRecon = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(navigationBarDoubleTap:)];
tapRecon.numberOfTapsRequired = 2;
[navController.navigationBar addGestureRecognizer:tapRecon];
[tapRecon release];
}
- (void)navigationBarDoubleTap:(UIGestureRecognizer*)recognizer {
[tableView setContentOffset:CGPointMake(0,0) animated:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment