Example #1
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();

            userNameField.Frame    = new CGRect(Bounds.X + 15, Bounds.Y + 60, Bounds.Width - 30, 32);
            userNameIconView.Frame = new CGRect(userNameField.Frame.Right - 28, userNameField.Frame.Y + 8, 16, 15);

            passwordField.Frame    = new CGRect(Bounds.X + 15, Bounds.Y + 99, Bounds.Width - 30, 32);
            passwordIconView.Frame = new CGRect(passwordField.Frame.Right - 28, passwordField.Frame.Y + 8, 16, 15);

            loginButton.Frame = new CGRect(Bounds.X + 15, Bounds.Y + 146, Bounds.Width - 30, 30);

            forgotPasswordButton.Frame = new CGRect(Bounds.X + 15, Bounds.Y + 180, forgotPasswordButton.SizeThatFits(new CGSize(Bounds.Width - 30, 0)).Width, 33);
            arrowView.Frame            = new CGRect(forgotPasswordButton.Frame.Right + 5, forgotPasswordButton.Frame.Top + 10, 8, 13);

            int orLabelYOffset = 230;

            if (!showForgotPassword)
            {
                orLabelYOffset -= 33;
            }

            orLabel.Bounds         = new CGRect(0, 0, orLabel.SizeThatFits(new CGSize(Bounds.Width - 56, 0)).Width, 20);
            orLabel.Center         = new CGPoint(Bounds.GetMidX(), Bounds.Y + orLabelYOffset);
            leftDividerView.Frame  = CGRect.FromLTRB(Bounds.X + 15, orLabel.Center.Y + 1, orLabel.Frame.Left - 13, orLabel.Center.Y + 3);
            rightDividerView.Frame = CGRect.FromLTRB(orLabel.Frame.Right + 13, orLabel.Center.Y + 1, Bounds.Right - 15, orLabel.Center.Y + 3);

            registerSuggesionLabel.Frame = new CGRect(Bounds.X + 15, Bounds.Y + orLabelYOffset + 12, Bounds.Width - 30, 20);

            registerButton.Frame = new CGRect(Bounds.X + 15, Bounds.Y + orLabelYOffset + 42, Bounds.Width - 30, 30);              //331
        }
Example #2
0
 public static CGRect ApplyInsets(this CGRect rectangle, UIEdgeInsets insets)
 {
     return(CGRect.FromLTRB(
                rectangle.Left + insets.Left,
                rectangle.Top + insets.Top,
                rectangle.Right - insets.Right,
                rectangle.Bottom - insets.Bottom));
 }