Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Swipe gesture added to UILabel, but its not working
  2. UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipedGesture:)];
  3. swipe.direction = UISwipeGestureRecognizerDirectionRight;
  4.  swipe.numberOfTouchesRequired = 1;
  5.   [self.myLabel.superview addGestureRecognizer:swipe];
  6.  
  7. - (void)swipedGesture:(UIGestureRecognizer *)recognizer
  8. {
  9.     NSLog(@"I swiped ;)");
  10. }