In iOS7, by default, UIBarButtonItem uses the regular Helvetica weight font for the UIBarButtonItemStylePlain style and bold weight for the UIBarButtonItemStyleDone.
My application uses custom fonts, and for this I use the UIAppearance proxy:
appearance = @{NSFontAttributeName: [UIFont fontWithName:@"ProximaNova-Regular" size:18.0]}; [[UIBarButtonItem appearance] setTitleTextAttributes:appearance forState:UIControlStateNormal];
The problem is that the appearance proxy makes regular and ready-made stylized buttons with the usual weight font indicated above.
Any ideas on how I can get a UIBarButtonItem to use different custom fonts depending on the style?
ios uikit ios7 uibarbuttonitem uiappearance
Marc regan
source share