ilight ilight - 1 month ago 18x
iOS Question

Change UITextField borderColor in Xamarin

I need to change a UITextField's borderColor to White in Xamarin.

I tried setting it's

and also runtime attributes in XCode IB but it was of no use.

Could someone please help me in achieving this?


This should get you there:

var textField = new UITextField();

textField.Layer.BorderColor = UIColor.White.CGColor;
textField.Layer.BorderWidth = 1f;

If that does not work, please show more code. Because then I presume your overwriting the style somewhere.