void SetFontSize (EntryLine view) { if (view.FontSize != Font.Default.FontSize) Control.Font = UIFont.SystemFontOfSize ((System.nfloat)view.FontSize); else if (view.FontSize == Font.Default.FontSize) Control.Font = UIFont.SystemFontOfSize (17f); }
void DrawBorder (EntryLine view) { var borderLayer = new CALayer (); borderLayer.MasksToBounds = true; borderLayer.Frame = new CoreGraphics.CGRect (0f, Frame.Height / 2, Frame.Width, 1f); borderLayer.BorderColor = view.BorderColor.ToCGColor (); borderLayer.BorderWidth = 1.0f; Control.Layer.AddSublayer (borderLayer); Control.BorderStyle = UITextBorderStyle.None; }
void SetPlaceholderTextColor (EntryLine view) { if (string.IsNullOrEmpty (view.Placeholder) == false && view.PlaceholderColor != Color.Default) { var placeholderString = new NSAttributedString (view.Placeholder, new UIStringAttributes { ForegroundColor = view.PlaceholderColor.ToUIColor () }); Control.AttributedPlaceholder = placeholderString; } }