我试图改变背景颜色的MFMailComposeViewController在iOS7但我不能使它发挥作用.
我正在使用以下剪辑:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
if([picker.navigationBar respondsToSelector:@selector(barTintColor)]) {
// iOS7
picker.navigationBar.barTintColor = READER_NAVIGATION_BAR_BACKGROUND_COLOR;
// Set back button arrow color
[picker.navigationBar setTintColor:READER_NAVIGATION_BAR_BACK_BUTTON_ARROW_COLOR];
// Set Navigation Bar Title Color
[picker.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObject:READER_NAVIGATION_BAR_TITLE_NORMAL_FONT_COLOR forKey:UITextAttributeTextColor]];
// Set back button color
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:READER_NAVIGATION_BAR_BUTTONS_FONT_COLOR, UITextAttributeTextColor,nil] forState:UIControlStateNormal];
}
Run Code Online (Sandbox Code Playgroud)
有谁知道如何改变iOS7中的bakcground颜色MFMailComposeViewController?
无论我似乎尝试什么,在用户选择通过电子邮件发送链接时出现的电子邮件屏幕(它是a MFMailComposeViewController),按钮始终是默认的蓝色.
我在我的AppDelegate中有这个:
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.000 green:156/255.0 blue:51/255.0 alpha:1]];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName: [UIColor whiteColor] }];
Run Code Online (Sandbox Code Playgroud)
它确实为标题MFMailComposeViewController而不是按钮着色.我该如何做到这一点?
当我在其他地方把它变成白色时,它也会使我的状态栏保持黑色.
objective-c ios uiappearance ios7 mfmailcomposeviewcontroller