Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- UISwipeGestureRecognizer *swipeGestureRecognizerLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipe:)];
- swipeGestureRecognizerLeft.direction = UISwipeGestureRecognizerDirectionLeft;
- for (UIView *subview in self.view.subviews)
- {
- if([subview isKindOfClass:[UIView class]] && !([subview isKindOfClass:[UIImageView class]]))
- {
- [subview addGestureRecognizer:swipeGestureRecognizerLeft];
- NSLog(@"Load 2");
- }
- }
- }
- -(void) didSwipe:(UISwipeGestureRecognizer *) swipeRecognizer {
- NSLog(@"Load swipe");
- if (swipeRecognizer.direction==UISwipeGestureRecognizerDirectionLeft)
- {
- NSLog(@"swipe Left");
- [self SlideToLeft];
- }
- }
Add Comment
Please, Sign In to add comment