MFMailComposeViewController外观setTintColor迷失iOS 7
发布时间:2020-12-14 18:11:41 所属栏目:百科 来源:网络整理
导读:这个问题适用于运行iOS 7的 Xcode 5,并且非常奇怪.我试图将所有UInavigation和UIBarButtonItem文本颜色设置为白色. 所以在我的app启动委托中,我将代码设置为. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionar
|
这个问题适用于运行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;
}
如果我两次启动“发送邮件”操作 我怎样才能解决这个问题? 解决方法
我必须这样做才能在iOS 7上运行
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];
mailViewController.mailComposeDelegate = self;
[mailViewController.navigationBar setTintColor:[UIColor whiteColor]];
[mailViewController.navigationBar setBarTintColor:[UIColor whiteColor]];
....
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
