我更改了 UINavigationBar 标题的字体和大小,但这样做会使标题不再正确对齐,所以我认为这"setTitlePositionAdjustment:"
应该可以工作,但它没有(无法识别的选择器)。如何调整标题的位置?
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[NSValue valueWithUIOffset:UIOffsetMake(0, -1)],
UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Cochin-Bold" size:24.0],
UITextAttributeFont,
nil]];
[[UINavigationBar appearance] setTitlePositionAdjustment:UIOffsetMake(0, 10)]; // Crash