[英]How do I change the color of the MFMessageComposeViewController elements?
I set up and open my MFMessageComposeViewController with the following: 我使用以下命令设置并打开我的MFMessageComposeViewController:
- (void)openSMSViewWithRecipientsArray:(NSArray *)recipients {
MFMessageComposeViewController *messageVC = [MFMessageComposeViewController new];
if([MFMessageComposeViewController canSendText]){
messageVC.body = @"";
[[messageVC navigationBar] setTintColor:[UIColor whiteColor]];
messageVC.recipients = recipients;
messageVC.messageComposeDelegate = self;
[self presentViewController:messageVC animated:YES completion:nil];
}
}
But the screen looks like this: 但屏幕看起来像这样:
So how do I change either the purple background where the numbers are, or change the number colors along with the plus sign color? 那么如何更改数字所在的紫色背景,或者更改数字颜色以及加号颜色?
I couldn't change only the purple background where the numbers were, so I had to change the whole nav bar color so it would apply to the background of the numbers: 我无法仅更改数字所在的紫色背景,因此我必须更改整个导航栏颜色,以便它适用于数字的背景:
- (void)setNavBarColor:(UIColor *)navBarColor titleColor:(UIColor *)titleColor {
[[UINavigationBar appearance] setBarTintColor:navBarColor];
[[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"Futura-Medium" size:17.0f],
UITextAttributeFont,
titleColor,
UITextAttributeTextColor,
nil]];
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.