Xamarin Studio 中 iOS 应用的屏幕布局乱序

Screen layout out of order in iOS app in Xamarin Studio

我正在使用 C# 和 Xamarin 制作基本的笔记应用程序。 我遇到的问题是在我的 AddNoteViewController 中,布局顺序错误。 正确的布局应该是:

1. Title entry box
2. Description label for text input
3. Text input field

但是,尽管我在代码中指定了布局,但描述标签不知何故位于标题输入框上方。

AddNoteViewController_.cs

using System;
using UIKit;

namespace NoteTaker.iOS
{
    public class AddNoteViewController : UIViewController
    {
        public AddNoteViewController () 
        {
        }

        public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();
            this.NavigationController.NavigationBar.BarTintColor = UIColor.FromRGB (255, 0, 255);
            this.Title = "New Note";
            this.NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes () { ForegroundColor = UIColor.White };

            this.NavigationController.NavigationBar.TintColor = UIColor.White;
            this.View.BackgroundColor = UIColor.White;

            var titleEntryBox = new UITextField () {
                Frame = new CoreGraphics.CGRect (10, 100, 250, 100),
                BackgroundColor = UIColor.Clear,
                Placeholder = "Enter title...",
                TextColor = UIColor.Black
            };


            var descriptionLabel = new UILabel () {
                Frame = new CoreGraphics.CGRect (10, 100, 250, 35),
                Text = "Enter description below"
            };


            var descriptionEntryBox = new UITextView () {
                Frame = new CoreGraphics.CGRect (10, 220, 250, 100),
                BackgroundColor = UIColor.Clear,
                TextColor = UIColor.Black
            };
            this.View.Add (titleEntryBox);
            this.View.Add (descriptionLabel);
            this.View.Add (descriptionEntryBox);
        }
    }
}

titleEntryBox 和 descriptionLabel 都位于 10,100