开发者

Handling touches in UITableViewController

I want to开发者_JAVA百科 implement the handling of an additional swipe gesture in my UITableViewController. However, it seems that in the case of tableviews the usual touch handling methods like -[touchesBegan::] of the controller are not called. How can I handle touches on a UITableView?


Are you looking to implement a per-row swipe gesture? In that case, I'd override touchesBegan (etc.) in a custom UITableViewCell subclass (and make sure that your UITableViewDelegate does not enable the default swipe-to-delete behavior).

Otherwise, I think your best option is to overlay a custom UIView subclass over your UITableView and handle gestures there, making sure to relay any non-gesture-related events to the UITableView.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜