Skip to content

Instantly share code, notes, and snippets.

@gliubc
Last active June 21, 2018 08:22
Show Gist options
  • Save gliubc/658a0b66909564497f236d99531dd2cc to your computer and use it in GitHub Desktop.
Save gliubc/658a0b66909564497f236d99531dd2cc to your computer and use it in GitHub Desktop.
UITapGestureRecognizer
UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleMenuTap:)];
[menu addGestureRecognizer:recognizer];
- (void)handleMenuTap:(UITapGestureRecognizer *)recognizer {
[self selectTabAtIndex:recognizer.view.tag];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment