在设计时,情节板中的iOS滚动视图是否可以滚动?在模拟器中未运行时
在故事板中,我有视图控制器,内部有一个滚动视图。问题是在设计时间(UIKIT)时滚动浏览不可滚动。是那样吗?不过,它在模拟器中工作正常。
In Storyboard i have view controller, inside i have a scroll view. question is scrollview is not scrollable while design time (UIKit). is it like that ? though, it works fine in simulator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您正确设置了约束,可以肯定的是,您可以在故事板 /接口构建器中滚动。
只需选择滚动视图的任何子视图,就可以像滚动其他任何内容一样滚动(例如此网页)。
在这里,我有一个带有多个标签和按钮的堆栈视图,在滚动视图中:
我有选择堆栈视图,如您所见,我可以滚动内容:
ed> edit - 示例没有 stack视图:
故事板源
If you have setup your constrains correctly, sure, you can scroll in Storyboard / Interface Builder.
Simply select any subview of the scroll view, and you can scroll just like you scroll anything else (such as this web page).
Here I have a stack view with several labels and buttons, in a scroll view:
I have the stack view selected and, as you see, I can scroll the content:
Edit - example without stack view:
Storyboard Source
接口构建器(与您要构建的XIB和故事板)不是“ Live”,您无法像SwiftUI预览的“实时”模式一样与UI元素进行交互。这也意味着您无法滚动滚动视图。
The Interface Builder (with which you're building XIBs and Storyboards) is not "live", you cannot interact with the UI elements like you can with the "live" mode of SwiftUI Previews. This also means you cannot scroll a scroll view.