在iOS中 - 在滚动视图中触摸文本字段时,视图无法滚动 [英] In iOS - When touching a text field in a scroll view the view can not scroll

查看:101
本文介绍了在iOS中 - 在滚动视图中触摸文本字段时,视图无法滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试通过触摸并拖动文本字段来滚动视图时,类似于在iPhone上的编辑联系人视图上滚动的方式,视图将不会移动,触摸和拖动文本字段之间或关闭滚动视图中文本字段的一侧有效,但在触摸文本字段时无效。

When trying to scroll a view by touching and dragging on a text field, similarly to how you would scroll around on the edit contacts view on the iPhone, the view will not move, touching and dragging in between the text fields or off to the side of the text fields in the scroll view works but not when touching a textfield.

任何见解都将不胜感激。谢谢!

Any insights would be greatly appreciated. Thanks!

推荐答案

尝试将 delaysContentTouches 属性设置为<$ c $对于已添加到文本字段的 UIScrollView ,c> YES 。这应该允许您在触摸时滚动,然后在文本字段中拖动。

Try setting the delaysContentTouches property to YES for the UIScrollView to which you have added to text field. This should allow you to scroll if you touch and then drag within a text field.

这篇关于在iOS中 - 在滚动视图中触摸文本字段时,视图无法滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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