gpt4 book ai didi

ios - 触摸手势在 Scrollview 中不起作用(Xcode、Swift)

转载 作者:行者123 更新时间:2023-11-29 06:00:48 24 4
gpt4 key购买 nike

我尝试在 ScrollView 中使用按钮。但它们并不是“触手可及”的。

我的没有 ScrollView 的应用程序正在运行。

我检查了是否启用了用户输入,但确实如此。

希望有人能给我建议。

问候

enter image description here

最佳答案

设置UIScrollView的以下属性以启用UIButton的触摸事件

scrollView.isUserInteractionEnabled = true
scrollView.isExclusiveTouch = true
scrollView.canCancelContentTouches = true
scrollView.delaysContentTouches = true

关于ios - 触摸手势在 Scrollview 中不起作用(Xcode、Swift),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54688404/

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