我有UITableView
。每个UITableViewCell
内容UIButton
。 UIButton's
框架等于UITableViewCell's
框架。但是当我点击按钮并滚动时,只有当我在单元格滚动之间的空间上点击时,滚动才起作用。我该如何解决这个问题?UITableViewCell与UIButton不滚动
0
A
回答
1
您需要禁用按钮的用户交互。然后,它不会采取触摸事件,你将能够正确滚动。
0
该按钮不会将触摸转发到单元格。
最简单的解决方案是给单元格一个按钮的外观并使用普通的委托方法。
相关问题
- 1. 触摸UITableViewCell中的UIButton不能滚动表格
- 2. UITableViewCell与自定义UIButton
- 3. UITableViewCell UIButton动态高度
- 4. UIButton覆盖UITableViewCell
- 5. 从UIButton UITableViewCell UIPopover
- 6. 滚动视图的UIbutton不互动
- 7. UITextField和UITableViewCell自动滚动
- 8. 滚动时UITableViewCell动画
- 9. UITableViewCell中的UITextField - UIButton
- 10. 自定义UITableViewCell UIButton
- 11. 隐藏UIButton的UITableviewcell
- 12. 如何动态添加UIButton到UITableViewCell?
- 13. UITextView不能在UITableViewCell中水平滚动
- 14. UIImageView不加载在UITableViewCell直到滚动
- 15. 的UITableViewCell滚动不与自定义单元格
- 16. 防止从viewForHeaderInSection滚动UITableViewCell
- 17. UITableViewCell在滚动上重绘
- 18. UITableViewCell滚动后重复
- 19. 水平检测滚动uitableviewCell
- 20. 慢速滚动中的UITableViewCell
- 21. UIButton不能在UItableViewCell中工作
- 22. UIButton在UITableViewCell事件不起作用
- 23. 的UIButton不能点击在UITableViewCell中
- 24. UITableViewCell中的UIButton面临图像更改问题,同时tableview滚动
- 25. UIButton图像不是UITableViewCell里面的动画
- 26. 确定UITableViewCell中的UIButton
- 27. UItableViewCell中的uibutton问题
- 28. 从UITableViewCell中删除UIButton
- 29. UITableViewCell与UIStackView在滚动时的动态高度问题
- 30. 滚动条不与滚动条
你可以添加一些代码,以及你用于创建单元格吗?也请尝试禁用按钮的用户交互./ – rishi
为什么你需要按钮?使用tableview委托来识别单元格上的触摸! – calimarkus
@rishi你对用户交互的建议是对的!非常感谢!你能发表这个答案吗? – RomanHouse