views:

316

answers:

4

Ok. I have made a custom cell for my table, and it contains a text view. When I have multiple lines in the text view, I can scroll up and down, but in doing this the table also scrolls. How can I stop this behaviour? If anyone needs parts of my code or further details, please just ask. I am more than willing.

Thank you for your help

A: 

Your custom cell seems to pass on touch events to its container class as well as utilizing them itself. Did you implement any - touchesBegan:, - touchesMoved: or - touchesEnded:?

If you make use of a touch events, you should not pass them on in the responder chain.

BastiBechtold
iPhone has no mouse.
KennyTM
Thanks for trying though. I just managed to answer a post thinking it was about the iPhone, when in fact it was about Mac. Easily done ;)
jrtc27
True, I edited it accordingly (@jrtc27: Saw that, and commented there, too ;) )
BastiBechtold
A: 

I suggest you to move text edit (write) behavior to another view controller. If you need read-only functionality from it then just increase cell and textView height.

Skie
A: 

Did you try setting canCancelContentTouches to NO? It's a property of UIScrollView, from which UITableView inherits.

Brian
A: 

When the text view has focus, set scrollEnabled=NO on the table view. You may have to manually remove focus from the text view and restore scrolling when a touch occurs outside the text view.

drawnonward