Как вы используете setTitleTextAttributes:forState:
в UIBarItem
в iOS
?
Как вы устанавливаете NSDictionary
? Не могу заставить его работать, и документация не очень понятна.
Из документации:
setTitleTextAttributes:forState:
Устанавливает атрибуты текста заголовков для заданного состояния управления:
- (void)setTitleTextAttributes:(NSDictionary *)attributes
forState:(UIControlState)state
Параметры:
: словарь, содержащий пары ключ-значение для текстовых атрибутов. Вы можете указать шрифт, цвет текста, цвет текста и теневое смещение текста, используя клавиши, перечисленные в NSString UIKit Reference.
state: состояние управления, для которого вы хотите установить текстовые атрибуты для заголовка.