[英]C# Monotouch/Xamarin.iOS - Scrollable UIView
If I have a UIView
whose height is larger than the height of the UIScreen
, and I fill it with other objects such as textbox's and label's. 如果我的
UIView
的高度大于UIScreen
的高度,我将其填充其他对象,如文本框和标签。 How do I make it so I can scroll through that entire view that contains all those other items? 如何制作它以便我可以滚动浏览包含所有其他项目的整个视图?
Currently some of the items within that main UIView
are off the screen at the bottom and I have no way of seeing them. 目前,主要
UIView
中的一些项目位于屏幕底部,我无法看到它们。
add scrollview and inside of your scrollview add your view. 添加scrollview并在scrollview内添加您的视图。
and only need the content size of scrollview 并且只需要scrollview的内容大小
ScrollView.ContentSize = new SizeF (1000f, 100f);
According to your question, UIScrollView would be the solution. 根据您的问题, UIScrollView将是解决方案。
A Nice tutorial to read:- http://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-content 一个很好的教程: - http://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-content
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.