![](/img/trans.png)
[英]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.