【发布时间】:2013-08-07 00:55:59
【问题描述】:
我的 App Delegate 中有这段代码:
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"Nav Bar.png"] forBarMetrics:UIBarMetricsDefault];
这很好用,但我使用 MFMailComposeViewController 并且我希望它具有默认的 NavigationBar 外观。
我该怎么做?
编辑:
我试过这段代码:
[[UINavigationBar appearanceWhenContainedIn: [MFMailComposeViewController class], [UIViewController class], nil] setBackgroundImage:[UIImage imageNamed:@"Textured Background.png"] forBarMetrics:UIBarMetricsDefault];
我也尝试过仅使用此代码。没有什么变化。默认导航栏,包括邮件视图控制器。
我认为这可能与appearanceWhenContainedIn: 有关。有谁知道MFMailComposeViewController 会包含什么内容?
【问题讨论】:
标签: ios objective-c uinavigationbar mfmailcomposeviewcontroller