I'm customizing the style of my navigation bar title font for iOS 13 using the new UINavigationBarAppearance object like this.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
appearance.titleTextAttributes = @{NSFontAttributeName: font};
UINavigationBar.appearance.standardAppearance = appearance;
// ...
}
It works but when the view controller transitions to another view controller the font becomes small and then it goes back to the correct size when the view is finished animating. Is this a bug in iOS 13 or does it not support larger font sizes in the navigation bar? Larger fonts do work fine as bar button items.
Edit: Sorry please ignore this question. I was mistakenly setting the overall appearance for a UILabel which was causing the problem.
from Does iOS 13 support other font sizes in the UINavigationBarAppearance?
No comments:
Post a Comment