我正在尝试使用iOS FontAwesome在条形按钮上设置图标,如下所示:
[self.barButton setTitle:[NSString fontAwesomeIconStringForEnum:FACamera]];
Run Code Online (Sandbox Code Playgroud)
还有这个:
[self.barButton setTitle:[NSString fontAwesomeIconStringForIconIdentifier:@"fa-camera"]];
Run Code Online (Sandbox Code Playgroud)
无论我使用什么标识符,结果都是一样的:

可能有什么不对?
万一其他人想知道:
[self.barButton setTitleTextAttributes:@{
NSFontAttributeName: [UIFont fontWithName:@"FontAwesome" size:24.0],
NSForegroundColorAttributeName: self.view.tintColor
} forState:UIControlStateNormal];
[self.barButton setTitle:[NSString fontAwesomeIconStringForIconIdentifier:@"fa-camera"]];
Run Code Online (Sandbox Code Playgroud)