如何在ios 8.3上设置MFMailComposeViewController navigitaion栏背景图像

如何在ios 8.3上设置MFMailComposeViewController navigitaion栏背景图像,ios,iphone,Ios,Iphone,在AppDelegate didFinishLaunchingWithOptions中 但当我回复系统电子邮件时: MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; [mc.navigationBar setTintColor:[UIColor whiteColor]]; [mc.navigationController.navigationBar setBackgroundImage

在AppDelegate didFinishLaunchingWithOptions中

但当我回复系统电子邮件时:

 MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
 [mc.navigationBar setTintColor:[UIColor whiteColor]];
 [mc.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"Topbar"] forBarMetrics:UIBarMetricsDefault];

[self presentViewController:mc animated:YES completion:^{
         [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];}];

但是MFMailComposeViewController也是白色的

使用[[UINavigationBar外观]setPartIntColor:desiredcolor]]我不想设置背景色,我想设置MFMailComposeViewController导航栏backgroundimage,为了保持样式统一,你不能为SDK组件设置。您可以使用UIColor的+UIColor*colorWithPatternImage:UIImage*image从图像中获取颜色,但打开MFMailComposeViewController时会导致崩溃。因此,最好获得与图像匹配的颜色,并使用上述功能设置色调颜色。我的导航不是半透明的,我设置了BackgroundImage,如果我设置了SetPartIntColor,然后在关闭MFMailComposeViewController时,应用程序的导航被更改,那么我应该做什么?我应该设置[UINavigationBar外观]SetPartIntColor:[颜色]]当打开MFMailComposeViewController时,导航仍为白色,为什么
 MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
 [mc.navigationBar setTintColor:[UIColor whiteColor]];
 [mc.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"Topbar"] forBarMetrics:UIBarMetricsDefault];

[self presentViewController:mc animated:YES completion:^{
         [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];}];