protected override void SetupLayoutConstraints() { base.SetupLayoutConstraints(); this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints(); this.AddConstraints( BackgroundImage.FullSizeOf(this)); this.AddConstraints( LoginField.AtTopOf(this, 220), LoginField.AtLeadingOf(this, 50), LoginField.AtTrailingOf(this, 50), LoginField.Height().EqualTo(Theme.Dimensions.TextFieldHeight), PasswordField.Below(LoginField, 12), PasswordField.WithSameLeading(LoginField), PasswordField.WithSameWidth(LoginField), PasswordField.WithSameHeight(LoginField), SignInButton.Below(PasswordField, 16), SignInButton.WithSameCenterX(this), SignInButton.Width().EqualTo(218), SignInButton.Height().EqualTo(44), ErrorMessageView.Above(LoginField, 36), ErrorMessageView.WithSameLeading(LoginField), ErrorMessageView.WithSameWidth(LoginField), ErrorMessageTriangleImage.Below(ErrorMessageView), ErrorMessageTriangleImage.WithSameCenterX(this)); }