[英]How do I access to color of '+' add button in searchbar of MFMessageComposeViewController
[英]How do I change the color of the MFMessageComposeViewController elements?
我使用以下命令设置并打开我的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];
}
}
但屏幕看起来像这样:
那么如何更改数字所在的紫色背景,或者更改数字颜色以及加号颜色?
我无法仅更改数字所在的紫色背景,因此我必须更改整个导航栏颜色,以便它适用于数字的背景:
- (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.