Note that there are some explanatory texts on larger screens.

plurals
  1. POUIGestureRecognizer blocking tableview scrolling
    primarykey
    data
    text
    <p>I have a table with static cells. One of these cells has a view in it with a pan gesture recogniser on it. </p> <p>When I am scrolling down my tableview, when I get to the cell with the view with pan gesture recogniser, scrolling doesn't seem to work. If I touch outside the view (to the side or top or bottom) it works and I can scroll. I have an if statement in my gesturerecognizer that tests whether a certain area has been touched, and if so performs an action.</p> <p>I have looked at this issue (http://stackoverflow.com/questions/3295239/uigesturerecognizer-blocking-table-view-scrolling) but setting cancelsTouchesInView to NO didn't work, I don't have anywhere setting the state property and using the method <code>- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer</code> I don't know where to get the 'otherGestureRecognizer' from or what object to call that method on.</p> <p>I'm assuming I wan't to put my gesture recogniser as the first argument, and the tableview's scroll gesture recogniser as the otherGestureRecogniser, is that correct? If so, how do I get that?</p> <pre><code>UIPanGestureRecognizer *windPanGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(moveWindHandle:)]; [self.windRangeView addGestureRecognizer:windPanGesture]; </code></pre> <p>Then in my moveWindHandle:</p> <pre><code> -(void)moveWindHandle:(UIPanGestureRecognizer *)gesture { gesture.cancelsTouchesInView = NO; isMovingHandle = [self isPoint:startedTouchAt insideHandle:_toHandleWindImageView]; if(isMovingHandle) { if(gesture.state == UIGestureRecognizerStateBegan) { //do stuff } } else { //i want it to ignore this gesture and just scroll like normal if that is what hte user did } } </code></pre> <p>I have set the tableviewcontroller as a UIGestureRecognizerDelegate, but I don't know what to do with that.</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