示例#1
0
        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);
        }
示例#2
0
 public static void SetIcon(this UIButton btn, FontIconTemplate template, UIControlState state = UIControlState.Normal)
 {
     btn.SetIcon(template.FontIcon((float)btn.Font.PointSize), state);
 }
示例#3
0
 public static void SetIcon(this UILabel label, FontIconTemplate template)
 {
     label.SetIcon(template.FontIcon((float)label.Font.PointSize));
 }