如何呈现 UIScrollView Modaly
我想呈现一个模式视图,其中 UIscrollView
作为视图的内容。我该怎么做?
I want to present a modal view with a UIscrollView
as the content of the view. How would I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
与往常一样,创建一个 viewController 并将其视图设置为滚动视图(在加载视图中)
并以模态方式呈现它:(在您的第一个 viewController 中)
As always, do a viewController and set it's view as the scroll view (in load view)
and present it modally : (in your first viewController)
创建一个标准的 UIViewController,并为其指定一个 UIScrollView 作为其视图成员。然后在当前(可见)视图控制器上使用 -[UIViewController PresentModalViewController:animated:] 。这将(默认情况下)将新的从底部滑入。
Create a standard UIViewController, and give it a UIScrollView as its view member. Then use -[UIViewController presentModalViewController:animated:] on your current (visible) view controller. This will (by default) slide the new one in from the bottom.