简体   繁体   English

UIButton取消我的滚动

[英]UIButton cancel my scroll

I have UITableView with customCell 我有带有customCell UITableView

inside the cell I have buttons.. whats happens is that when I scroll down the buttons was very sensitive so I add the lines: 在单元格内有按钮。发生的事情是当我向下滚动按钮时非常敏感,因此添加了以下行:

self._tableView.canCancelContentTouches = YES; 

self._tableView.delaysContentTouches = NO;

and its start to work fine beside one thing, in facebook app when u press a button hold.. then scroll its start to scroll.. how they done it? 和它的开始工作正常,在旁边的事情,在Facebook应用程序中,当您按下按钮按住..然后滚动其开始滚动..他们是如何做到的? whats happens in my case is that when u hold a button and scroll its not scrolling but cancel the button action.. 在我的情况下发生的是,当您按住一个按钮并滚动时,不是滚动而是取消了按钮动作。

They've done it by having delaysContentTouches set to YES. 他们通过将delaysContentTouches设置为YES来做到这一点。 What do you mean by "the buttons were very sensitive", which you tried to fix by setting it to NO? “按钮非常敏感”是什么意思,您尝试通过将其设置为“ NO”来解决?

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

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