I have a custom content view with a large interactive control with multiple sub-views which have Pan gestures attached. The interactive bits on the left of the control work, but the bits on the right do not work.
My guess is there is some view that’s absorbing the gestures. Is there a way to make sure the gestures pass through on the control side or table cell side?
I’ve tried doing the following:
[[cell textLabel] removeFromSuperview];
[[cell accessoryView] removeFromSuperview];
[[cell backgroundView] removeFromSuperview];
[[cell contentView] addSubview:display]; //adding my custom view
I’ve had similar problems, with the cell constraining the contentView width. Try setting the background color of the contentView to green or something – this is the max you are going to get in terms of usable area.
I believe what you will need to do is when you know a user wants to interact with the control pull it out of the cell and add it to the main view. When done, put it back where it was. During this of course you would have to prevent scrolling.
If moving the control causes issues with the stream of touches, you can add another clear view that overlays the control, intercepts the first touch, moves the control, then forwards the touch to the control.
Obviously, this technique helps you ultimately get touches over the whole surface of your control once its moved, but the initial touch won’t work if its too far to the right.