Note that there are some explanatory texts on larger screens.

plurals
  1. POUISwipeGestureRecognizer selector not called. Any idea why?
    primarykey
    data
    text
    <p>I'm using the code below to integrate right/left swipe events to a UIImageView object (called <strong>photo_view</strong>) but it did not work after tests in iphone simulator and device. The methods <strong>handleLeftSwipe</strong> and <strong>handleRightSwipe</strong> below are not even called as logging didn't print anything in the debugger logs as it should. Here is the code:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; UISwipeGestureRecognizer *leftSwipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleLeftSwipe:)]; leftSwipeRecognizer.direction = UISwipeGestureRecognizerDirectionLeft; leftSwipeRecognizer.numberOfTouchesRequired = 1; [photo_view addGestureRecognizer:leftSwipeRecognizer]; leftSwipeRecognizer.delegate = self; [leftSwipeRecognizer release]; UISwipeGestureRecognizer *rightSwipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleRightSwipe:)]; rightSwipeRecognizer.direction = UISwipeGestureRecognizerDirectionRight; rightSwipeRecognizer.numberOfTouchesRequired = 1; [photo_view addGestureRecognizer:rightSwipeRecognizer]; rightSwipeRecognizer.delegate = self; [rightSwipeRecognizer release]; } - (void)handleLeftSwipe:(UISwipeGestureRecognizer *)recognizer { NSLog(@"handleLeftSwipe called"); } - (void)handleRightSwipe:(UISwipeGestureRecognizer *)recognizer { NSLog(@"handleRightSwipe called"); } </code></pre> <p>Any idea what the reason ?</p> <p>Thx in advance for helping,</p> <p>Stephane</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload