简体   繁体   English

我可以仅对UITableViewCellEditingStyleDelete使用向左滑动,并使向右滑动手势响应另一种方法吗?

[英]Can I use only left swipe for UITableViewCellEditingStyleDelete and make right swipe gesture respons to another method?

I'm using UITableViewCellEditingStyleDelete in my project. 我在项目中使用UITableViewCellEditingStyleDelete。 Now both the left and right swip gesture will active the delete button. 现在,左右滑动手势都将激活删除按钮。

I want only the left swipe gesture to active the delete button, and make right swipe gesture to response to another method(to pop viewController). 我只希望向左滑动手势以激活删除按钮,并向右滑动手势以响应另一种方法(以弹出viewController)。

How can I implement this? 我该如何实施?

Thanks very much. 非常感谢。

您可以将自己的自定义UIGestureRecognizers添加到UITableViewCell子类的视图中,而不使用UITableView的内置行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM