i have been using what i had thought to be some fairly standard iOS 5 code (and which is a 7x accepted answer on stackoverflow) in order to have my UINavigationBar's title appear with a customized font.]
but i have discovered that when my app built for iOS5 (so that it can run on both iOS5 and iOS6 devices) is run on the iOS6 simulator, it ellipsizes my title.
the following is the same code running on the iOS 5.1 simulator.
for clarity, the following is the pertinent code that's been working until i tried running on iOS 6.
#define COURIER_FONT_BOLD @"CourierNewPS-BoldMT"
- (UIFont*)navigationBarTitleFontPortrait
{
if (!_navigationBarTitleFontPortrait)
_navigationBarTitleFontPortrait = [UIFont fontWithName:COURIER_FONT_BOLD size:24.0];
return _navigationBarTitleFontPortrait;
}
// …
if ([[UINavigationBar class] respondsToSelector:@selector(appearance)])
{
NSDictionary* attrs = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor lightGrayColor],
UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(1, 0)],
UITextAttributeTextShadowOffset,
navigationBarTitleFontPortrait,
UITextAttributeFont,
nil];
[[UINavigationBar appearance] setTitleTextAttributes:attrs];
}