NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithString: @”\U0000e600” attributes: @{NSForegroundColorAttributeName: UICOLOR_ARGB(0xffacacac), NSFontAttributeName: [UIFont fontWithName: FONT_NAME_ICON size: 23]}];
[biggieMoreBtn setAttributedTitle:title forState:UIControlStateNormal];
[biggieMoreBtn addTarget:self action:@selector(moreBiggie) forControlEvents:UIControlEventTouchUpInside];
本文介绍如何使用 Objective-C 为 UIButton 设置自定义属性,包括图标字体、颜色及大小,并实现点击事件响应。
374

被折叠的 条评论
为什么被折叠?



