Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个填充屏幕的 uiscrollview,在底部有一个更像底部的停靠栏的图像视图。现在,当用户单击底部的图像视图时,它会触发滚动视图上的事件,我该如何阻止它?
将图像视图的 userInteractionEnabled 属性设置为 true。您可以在界面生成器或代码中(在 viewDidLoad 中)执行此操作,
imageView.userInteractionEnabled = YES;