开发者

How to present a UIScrollView Modaly

开发者 https://www.devze.com 2022-12-15 15:45 出处:网络
I want to present a modal view with a 开发者_如何学编程UIscrollView as the content of the view. How would I do this?As always, do a viewController and set it\'s view as the scroll view (in load view)

I want to present a modal view with a 开发者_如何学编程UIscrollView as the content of the view. How would I do this?


As always, do a viewController and set it's view as the scroll view (in load view)

self.view = aScrollView;

and present it modally : (in your first viewController)

[self presentModalViewController:theViewController animated:YES];


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消