I have this gesture swipe method that I want to call from another method using
[self performSelector:@selector(handleSwipeGesture:)
withObject:nil afterDelay:10];
I can’t figure out the syntax to put in the @selector()
any help is appreciated. here’s my code:
- (IBAction)handleSwipeGesture:(UISwipeGestureRecognizer *)sender {
if(sender.direction == UISwipeGestureRecognizerDirectionLeft) {
NSLog(@"swipe left");
TutorialMenuViewController *tutorialMenuViewController = [[TutorialMenuViewController alloc]
initWithNibName:@"TutorialMenuViewController" bundle:nil];
[self.navigationController pushViewController:tutorialMenuViewController animated:YES];
[tutorialMenuViewController release];
}
}
If you want to present
TutorialMenuViewControllereither on a gesture or time delay you would be better off just abstracting its presentation out into a different methodNow you can simply call