将滚动手势从另一个视图传递到UIScrollView [英] Passing scroll gesture to UIScrollView from another view

查看:272
本文介绍了将滚动手势从另一个视图传递到UIScrollView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实有一个具有UIScrollView的视图,并且在它上面有一个显示一些文本的视图. 当用户在包含文本的视图上滑动时,UIScrollView将不会滚动.如何使该视图透明,从而将滑动手势中继到UIScrollView.

I do have a view that has a UIScrollView and over it there is a view that display some text. When the user swipes over this view that contains text the UIScrollView won't scroll. How to make this view transparent in a way it relays the swipe gesture to UIScrollView.

谢谢

推荐答案

您可以设置

myTextView.userInteractionEnabled = NO;

或者,如果您正在使用Interface Builder创建视图,则有一个名为已启用用户交互"的复选框,只需取消选中该复选框即可.

Or, if you're creating your view with Interface Builder, there's a check box there called 'User interaction enabled', just uncheck that.

这篇关于将滚动手势从另一个视图传递到UIScrollView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆