I've created a custom renderer for a label and works fine on Android.
I am now trying to make it work on iOS but nothing happens, the label never changes.
Here is what I've tried:
public class LabelMonospace_iOS:LabelRenderer
{
protected override void OnElementChanged (ElementChangedEventArgs<Label> e)
{
base.OnElementChanged (e);
if (Control != null) { // perform initial setup
Control.Font = UIFont.FromName ("Helvetica", 32f);
Control.TextColor = UIColor.Cyan;
}
LabelMonospace el = (LabelMonospace)this.Element;
var labelTextField = (UILabel)Control;
labelTextField.TextColor = UIColor.Magenta;
}
}
I am exporting it with
[assembly: ExportRenderer (typeof (LabelMonospace), typeof (LabelMonospace_iOS))]
I am using Xamarin Forms 1.3
Any hint? thank you.