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.
我有一个带有标签和文本字段的UIView,我在模拟器中对其进行了测试,发现我无法滚动查看视图的其余部分,如何将视图变成UIScrollView以及我需要做什么才能使查看可滚动?我不想移动标签和东西或删除UIView,有没有简单的方法?
在您的视图之外获取一个UIScrollViewin文件。Xib将您的视图拖入此scrollview. 您的subviews内部视图保持不变。scrollview并设置contentSize
UIScrollView
Xib
scrollview
subviews
contentSize