3

我使用UIAppearance API中的iOS 5推出定制我所有的导航栏的外观:使用UIAppearance样式除了在模态视图控制器?

[[UINavigationBar appearance] setTitleTextAttributes:titleTextAttributes]; 
[[UINavigationBar appearance] setTitleVerticalPositionAdjustment:+2.f forBarMetrics:UIBarMetricsDefault]; 
[[UIBarButtonItem appearance] setTintColor:[UIColor lightTextColor]]; 

这伟大工程都是我自己的导航栏。

然而,它也样式所有系统提供的导航栏,诸如当我模态显示MFMailComposeViewController(下面见截图),或使用ABPeoplePicker

是否可以定义例外,如“模式显示时不要使用此外观”?

Inadvertently styled system navigation bar

回答

0

看看appearanceWhenContainedIn选项,这可以让你选择的外观适用于

该视图 - 控制类