public static void SetIcon(this UIBarButtonItem btn, FontIconTemplate template, UIColor color, UIControlState state = UIControlState.Normal) { var attrs = btn.GetTitleTextAttributes(state); var size = attrs.Font != null ? attrs.Font.PointSize : 12; btn.SetIcon(template.FontIcon((float)size), color, state); }
public static void SetIcon(this UIButton btn, FontIconTemplate template, UIControlState state = UIControlState.Normal) { btn.SetIcon(template.FontIcon((float)btn.Font.PointSize), state); }
public static void SetIcon(this UILabel label, FontIconTemplate template) { label.SetIcon(template.FontIcon((float)label.Font.PointSize)); }