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.
精彩评论