Составление CodaFi и user1046037 ответы:
Создание UIBarButtonItem с символом Юникод в качестве заголовка.
Вы должны инициализировать UIBarButtonItem
заголовком (initWithTitle:
), а не системным элементом (initWithBarButtonSystemItem:
).
Вы можете установить пользовательский заголовок со строкой (например, символ Unicode).
Вы можете изменить размер заголовка.
UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc] initWithTitle:@"\u2699" style:UIBarButtonItemStylePlain target:self action:@selector(showSettings)];
UIFont *customFont = [UIFont fontWithName:@"Helvetica" size:24.0];
NSDictionary *fontDictionary = @{NSFontAttributeName : customFont};
[settingsButton setTitleTextAttributes:fontDictionary forState:UIControlStateNormal];