0

I've done a custom UITableViewCell` with a front view and a back view for doing something like mailbox.

I've added the gestureRecognizer to scroll the front view so

self.slideRecognizer = 
 [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(slide:)];
[self.slideRecognizer setDelegate:self];
[self addGestureRecognizer:self.slideRecognizer];

The problem is that I cant scroll the UITableView down unless I tap outside the UITableViewCell (for example on UITableView header) and go down.

There should be something to add or edit in my method

- (void)slide:(UIPanGestureRecognizer *)panRecognizer

It's true?

THAT'S THE SOLUTION FOR ME ____________________________________________________________________________

Based on Simon's link, I've added this code in my tableViewController and in my custom cell

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 
        shouldRecognizeSimultaneouslyWithGestureRecognizer:
           (UIGestureRecognizer *)otherGestureRecognizer {
    return YES;
}

The problem was that assigning the custom pan gestureRecognizer I've invalidating the default one.

Alex Cio
  • 6,014
  • 5
  • 44
  • 74
Gnamm
  • 633
  • 2
  • 8
  • 17
  • If my answer solved your question please remember to mark it as top answer so that others will know that it solved the issue and I get the rep points. Thanks – Simon McLoughlin Dec 27 '13 at 13:34
  • Try this link https://github.com/alikaragoz/MCSwipeTableViewCell. This is already implemented swiping cell ready to use. – HereTrix Dec 24 '13 at 12:52

1 Answers1

1

I would take a look at this question which seems quite similar. It sounds as though the gesture is only being captured by that cell and not passed through.

Tell ScrollView to Scroll after other pan gesture

I'm not sure if this is exactly the same issue as yours however. You should post more code.

On a side note, personally as a developer and a user I find scrolling elements inside scrolling elements to be every irritating to use. From a usability perspective I would consider a redesign. Thats only my opinion however.

Community
  • 1
  • 1
Simon McLoughlin
  • 8,293
  • 5
  • 32
  • 56
  • I'm agree with you but I didn't choose myself the design. I read the link and changed the question consequently, thank you! – Gnamm Dec 25 '13 at 08:44