我使用以下内容设置并打开我的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];
}
}
但屏幕看起来像这样:
那么如何更改数字所在的紫色背景,或者更改数字颜色以及加号颜色?
答案 0 :(得分:4)
我无法仅更改数字所在的紫色背景,因此我必须更改整个导航栏颜色,以便它适用于数字的背景:
- (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]];
}