With iOS 6, I have several problems using custom style in my application. I use my own font and several UIAppearance . The problem that I cannot figure out is the misalignment of the name in my UINavigationBar. In iOS 5, everything worked fine and was properly aligned.
Since iOS6 is released and user style is not uncommon, I assume that this is not a mistake, but my misunderstanding of some new change for iOS6.

I was looking for documentation for the text alignment method to call the UIAppearance proxy, but I could not find such a method.
I use the following lines of code to style my UINavigationBar throughout my application:
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackground"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackground"] forBarMetrics:UIBarMetricsLandscapePhone]; [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], UITextAttributeTextColor, [UIFont fontWithName:@"Corbel-Bold" size:14.0], UITextAttributeFont, nil]]; [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:[UIColor whiteColor]]; [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor ceBlueColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@"Corbel" size:0.0], UITextAttributeFont, nil] forState:UIControlStateNormal]; [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -3) forBarMetrics:UIBarMetricsDefault];
source share