我正在使用 Xamarin 工具并尝试使用 LoadNib 加载视图,然后将其添加到 UIScrollView。我做错了什么。视图显示,但我无法让它滚动。代码如下。我究竟做错了什么?
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform any additional setup after loading the view, typically from a nib.
scrollView = new UIScrollView (
new RectangleF (0, 0, View.Frame.Width
, View.Frame.Height - NavigationController.NavigationBar.Frame.Height));
View.AddSubview (scrollView);
var arr = NSBundle.MainBundle.LoadNib("AboutView", this, null);
var v = Runtime.GetNSObject(arr.ValueAt(0)) as UIView;
scrollView.ContentSize = v.Frame.Size;
scrollView.AddSubview(v);
}