Guest User

Untitled

a guest
Jan 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. - (void)viewDidLoad
  2. {
  3. UISwipeGestureRecognizer *swipeGestureRecognizerLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipe:)];
  4. swipeGestureRecognizerLeft.direction = UISwipeGestureRecognizerDirectionLeft;
  5. for (UIView *subview in self.view.subviews)
  6. {
  7. if([subview isKindOfClass:[UIView class]] && !([subview isKindOfClass:[UIImageView class]]))
  8. {
  9. [subview addGestureRecognizer:swipeGestureRecognizerLeft];
  10. NSLog(@"Load 2");
  11. }
  12. }
  13. }
  14.  
  15. -(void) didSwipe:(UISwipeGestureRecognizer *) swipeRecognizer {
  16. NSLog(@"Load swipe");
  17.  
  18. if (swipeRecognizer.direction==UISwipeGestureRecognizerDirectionLeft)
  19. {
  20. NSLog(@"swipe Left");
  21. [self SlideToLeft];
  22. }
  23. }
Add Comment
Please, Sign In to add comment