我有一个带有自定义单元格的表视图,我可以识别该单元格中的滑动。这工作得很好,但我希望表视图能够正常运行。当我点击表格视图上的任何地方时,我希望单元格被选中并执行动作tableView:didSelectRowAtIndexPath:
任何提示或想法?
感谢。
答案 0 :(得分:1)
我假设您正在UITableView单元子类中实现各种UIResponder方法。如果您希望堆栈的其余部分继续处理事件,您可以将它们传递出去:
- (void) touchEnded:(UITouch *)touch withEvent:(UIEvent *)event {
//do something with touch
//...
//pass the event to super which cause it to continue along the chain as
//though you didn't do anything special with it
[super touchEnded:touch withEvent:event];
}