[英]How do I add UIView on UIScrollView
I wanted to add some labels and textfields on my view and that view should scroll, so I am thinking of putting view on scrollview. 我想在视图上添加一些标签和文本字段,并且该视图应该滚动,因此我正在考虑将视图放在scrollview上。
可能是您的内容少于ScrollView
,这就是禁用滚动的原因
Put view with labels in scrollview. 将带有标签的视图放在scrollview中。 Scrollview should be less in height than view.
滚动视图的高度应小于视图的高度。 View should have height considering all ui cvontrols in it.
考虑到其中的所有ui控件,视图应具有高度。 should work like this
应该像这样工作
Make sure your scroll view height is not greater than view its content size has to be greater as all people says. 确保滚动视图的高度不大于所有人都说的视图内容的大小。 You get confused between content size and scroll view height.
您会在内容大小和滚动视图高度之间感到困惑。 Meas using nib suppose your scroll view height is 300 and when you use the code content size should be greater than 480 so it will be scroll-able on iPhone 4 size device who's height is 480
使用笔尖进行测量时,假设滚动视图的高度为300,并且使用代码内容时大小应大于480,以便在高度为480的iPhone 4尺寸设备上可以滚动。
To make sure your constraints are well defined, first check these steps: 为了确保约束条件定义正确,请首先检查以下步骤:
Please consider that: 请考虑:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.