how to write inside a cell of UITableView
How do I write inside a cell of UITableView
using TouchesBegan
and TouchesEnd
methods?开发者_如何学Go
A UITableView
scrolls and so cells move. What you are talking about would pretty much prohibit a table from being able to scroll. Of course you could have a static table or some other table which never scrolls and so you think that's ok.
In that case, handling touch events in a UITableViewCell
is the same as handling the touch events in any other UIView
. You could use a add a UIGestureRecognizer
to the view and pull interaction that way or access the information through the UIResponder
.
On thing to remember is, make sure userInteractionEnabled
is set to YES
if you are going straight through the UIResponder
otherwise you'll just end up ignoring the events.
精彩评论