gpt4 book ai didi

ios - 对 touchDown 使用react的自定义 UITableViewCell

转载 作者:行者123 更新时间:2023-12-01 16:48:39 25 4
gpt4 key购买 nike

制作方法UITableViewCell ,它调用 tableView willSelectRowAtIndexPath 上的委托(delegate)方法(didSelectRowAtIndexPathtouchDown)事件(与 TouchUpInside 不同,触摸后立即发生)?

最佳答案

创建一个自定义单元格并向其添加一个事件处理程序,使用:

- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents.

使用 UIControlEventTouchDown 常数作为第三个参数。您可以在自己的事件处理程序中做任何您想做的事情。您可以将表格 View 的 allowSelection 属性设置为 .

关于ios - 对 touchDown 使用react的自定义 UITableViewCell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17995172/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com