What's the "easiest" way to add padding (all four sides) to a UITextField in Xamarin for iOS 7. Following code doesn't seem to work on iOS7.
textField.LeftView = new UIView (new RectangleF (0, 0, 10, 10));
textField.LeftViewMode = UITextFieldViewMode.Always;
Then I tried to subclass UITextField to try another option...
public class TextFieldBase : UITextField
{
public TextFieldBase (IntPtr handle) : base (handle)
{
}
public override RectangleF TextRect(RectangleF bounds){
return RectangleF.Inflate( bounds , 10 , 10 );
}
public override RectangleF EditingRect(RectangleF bounds){
return RectangleF.Inflate( bounds , 10 , 10 );
}
}
That didn't work either.
I'm not sure if what I have set in the interface builder is overriding what I have in the subclass code.