Пример #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var okButton     = PrepareOkButton();
            var cancelButton = PrepareCancelButton();
            var title        = PrepareTitleLabel();

            PrepareTableView();
            PrepareSelectedRowItems();

            View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            var statusbarHeight = UIApplication.SharedApplication.StatusBarFrame.Height;
            var buttonHeight    = 44;

            View.AddConstraints(

                title.AtTopOf(View, statusbarHeight),
                title.Height().EqualTo(buttonHeight),
                title.WithSameCenterX(View),

                _table.Below(title),
                _table.Above(okButton),
                _table.WithSameWidth(View),

                cancelButton.WithSameBottom(View),
                cancelButton.Below(_table),
                cancelButton.Height().EqualTo(buttonHeight),
                cancelButton.WithSameLeft(View).Plus(8),

                okButton.WithSameBottom(View),
                okButton.Below(_table),
                okButton.Height().EqualTo(buttonHeight),
                okButton.WithSameRight(View).Minus(8)
                );
        }