我已经在具有dragInteractionEnabled = true的UITableView中实现了touchesbegan,touchesMoved,touchesEnded和touchesCancelled。在触摸表格视图时,将调用touchesBegan,但是一段时间后开始拖动,并且touchesCancelled被自动调用。有没有办法保持触摸直到用户将手指从tableView上抬起?
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
print("touchesBegan")
}
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
print("touchesEnded")
}
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
print("touchesMoved")
}
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
print("touchesCancelled")
}