Example #1
0
 public static void SetAttributesForTextField(this PaddingTextField field)
 {
     field.Layer.BackgroundColor = new UIColor((nfloat)(244.0 / 255.0), (nfloat)(244.0 / 255.0), (nfloat)(244.0 / 255.0), (nfloat)1.0).CGColor;
     field.Layer.BorderColor     = new UIColor((nfloat)(215.0 / 255.0), (nfloat)(215.0 / 255.0), (nfloat)(215.0 / 255.0), (nfloat)1.0).CGColor;
     field.Layer.BorderWidth     = (nfloat)0.5;
     //field.EdgeInsets = new UIEdgeInsets(0, 10, 0, 10);
 }
Example #2
0
        protected override void SetupSubviews()
        {
            base.SetupSubviews();

            BackgroundColor = UIColor.White;

            SignInButton = new UIButton(UIButtonType.Custom)
                           .WithStyle(Theme.ButtonStyle.Accent);

            BackgroundImage = new UIImageView(UIImage.FromBundle("LoginBackground"));

            LoginField = new PaddingTextField()
                         .WithStyle();

            PasswordField = new PaddingTextField
            {
                SecureTextEntry = true
            }.WithStyle();

            ErrorLabel = new UILabel()
            {
                TextAlignment = UITextAlignment.Center,
                Lines         = 0,
                TextColor     = Theme.Colors.ErrorText,
                TranslatesAutoresizingMaskIntoConstraints = false
            };

            ErrorMessageView = new UIView()
            {
                BackgroundColor = Theme.Colors.OverlayBackground,
                ClipsToBounds   = true
            };

            ErrorMessageView.Layer.CornerRadius = 4;

            ErrorMessageView.AddSubview(ErrorLabel);

            ErrorMessageTriangleImage = new UIImageView(UIImage.FromBundle("Triangle"));
        }