MFMailComposeViewController外观setTintColor迷失iOS 7

MFMailComposeViewController外观setTintColor迷失iOS 7,第1张

概述这个问题适用于运行iOS 7的 Xcode 5,并且非常奇怪.我试图将所有UInavigation和UIBarButtonItem文本颜色设置为白色. 所以在我的app启动委托中,我将代码设置为. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launch 这个问题适用于运行iOS 7的 Xcode 5,并且非常奇怪.我试图将所有UInavigation和UIbarbuttonItem文本颜色设置为白色.

所以在我的app启动委托中,我将代码设置为.

- (BOol)application:(UIApplication *)application dIDFinishLaunchingWithOptions:(NSDictionary *)launchOptions{    UIImage *NavigationPortraitBackground = [UIImage imagenamed:@"button_header_blue"];    // Set the background image all UINavigationbars    [[UINavigationbar appearance] setBackgroundImage:NavigationPortraitBackground forbarMetrics:UIbarMetricsDefault];    // Set the text appearance for navbar    [[UINavigationbar appearance] setTitleTextAttributes:     [NSDictionary dictionaryWithObjectsAndKeys:      [UIcolor whitecolor],UITextAttributeTextcolor,[UIcolor whitecolor],UITextAttributeTextShadowcolor,[NSValue valueWithUIOffset:UIOffsetMake(0,0)],UITextAttributeTextShadowOffset,[UIFont FontWithname:@"Helvetica Neue" size:21],UITextAttributeFont,nil]];    [[UINavigationbar appearance] setTintcolor:[UIcolor whitecolor]];    NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:                                [UIcolor whitecolor],nil];    [[UIbarbuttonItem appearance] setTitleTextAttributes:attributes forState: UIControlStatenormal];    [[UIbarbuttonItem appearance] setTintcolor:[UIcolor whitecolor]];    // OverrIDe point for customization after application launch.    return YES;}

如果我两次启动“发送邮件” *** 作
– 我第一次看到UIbarbutton项目是白色的.我看着它并点击取消按钮
– 第二次我看到他们所有人都变灰了,除了头衔之外几乎看不见.
– 这在我的iPhone模拟器和运行iOS 7的iPhone上都有发生.

我怎样才能解决这个问题?

解决方法 我必须这样做才能在iOS 7上运行

if ([MFMailComposeVIEwController canSendMail])    {        MFMailComposeVIEwController *mailVIEwController = [[MFMailComposeVIEwController alloc] init];        mailVIEwController.mailComposeDelegate = self;        [mailVIEwController.navigationbar setTintcolor:[UIcolor whitecolor]];        [mailVIEwController.navigationbar setbarTintcolor:[UIcolor whitecolor]];....
总结

以上是内存溢出为你收集整理的MFMailComposeViewController外观setTintColor迷失iOS 7全部内容,希望文章能够帮你解决MFMailComposeViewController外观setTintColor迷失iOS 7所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1032671.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-24
下一篇2022-05-24

发表评论

登录后才能评论

评论列表(0条)

    保存