我的应用程序中的一个屏幕必须是可垂直滚动的.它的内容或多或少是静态的,但它不适合手机的屏幕(因此是滚动视图).我使用 UIScrollController
作为顶视图,我想使用 Xcode 中的情节提要编辑器来布置其中的所有视图.我可以这样做吗?我显然可以在 UIScrollController
的可见部分放置东西,但是我可以在视觉上将更多视图放在首屏"吗?
One of the screens in my app has to be vertically scrollable. Its contents is more or less static, but it doesn't fit on the phone's screen (hence the scroll view). I'm using a UIScrollController
as a top view, and I'd like to use the storyboard editor in Xcode to lay out all the views in it. Can I do that? I can obviously drop things on the visible part of my UIScrollController
, but can I put more views "below the fold" visually?
还有另一种方法可以做到这一点,它与上面评论中链接中给出的答案不同,我认为这更容易,因为它可以让你看到你的以全尺寸查看整个内容并在 Storyboard 中进行设计.
There is another way to do it that is different from the answers given in the link in the comment above which I believe is easier because it allows you to see your whole content view at full size and design it in Storyboard.
诀窍在于#3  将滚动视图的大小设置为非常大,以便您进行设计.当这个 viewController 被加载到 iPhone 中时,Struts &Springs 会将 scrollView 的大小调整为 iPhone 屏幕的大小,但 contentView 会保持较大.
The trick is in #3 & #5 setting the size of the scrollView to really large so you can design. When this viewController is loaded into the iPhone the Struts & Springs will resize the scrollView to the size of the iPhone screen, but the contentView will stay large.
这篇关于在大型 UIScrollView 中直观地排列子视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!