protected override void SetupLayoutConstraints()
        {
            base.SetupLayoutConstraints();

            this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            this.AddConstraints(
                VacationTypeImageView.AtLeftOf(this, AppDimens.Inset1X),
                VacationTypeImageView.WithSameCenterY(this),
                VacationTypeImageView.Height().EqualTo(AppDimens.Inset5X),
                VacationTypeImageView.Width().EqualTo(AppDimens.Inset5X));

            this.AddConstraints(
                VacationDurationLabel.AtTopOf(this, AppDimens.Inset1X),
                VacationDurationLabel.ToRightOf(VacationTypeImageView, AppDimens.Inset1X)
                );

            this.AddConstraints(
                VacationTypeLabel.Below(VacationDurationLabel, 4),
                VacationTypeLabel.WithSameLeft(VacationDurationLabel),
                VacationTypeLabel.AtBottomOf(this, AppDimens.Inset1X));

            this.AddConstraints(
                VacationStatusLabel.Height().EqualTo(56),
                VacationStatusLabel.AtRightOf(ArrowImageView, AppDimens.Inset2X),
                VacationStatusLabel.WithSameCenterY(this));

            this.AddConstraints(
                ArrowImageView.AtRightOf(this, AppDimens.Inset1X),
                ArrowImageView.Width().EqualTo(AppDimens.Inset1X),
                ArrowImageView.Height().EqualTo(AppDimens.Inset1X),
                ArrowImageView.WithSameCenterY(this));
        }
Esempio n. 2
0
        protected override void SetupLayoutConstraints()
        {
            base.SetupLayoutConstraints();

            this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            this.AddConstraints(
                VacationTypeImageView.WithSameCenterX(this),
                VacationTypeImageView.WithSameCenterY(this),
                VacationTypeImageView.Width().EqualTo(AppDimens.Inset8X),
                VacationTypeImageView.Height().EqualTo(AppDimens.Inset8X));

            this.AddConstraints(
                VacationTypeLabel.Below(VacationTypeImageView, AppDimens.Inset1X),
                VacationTypeLabel.WithSameCenterX(this));
        }