4

我使用以下内容设置并打开我的 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];
    }
}

但是画面是这样的:

在此处输入图像描述

那么如何更改数字所在的紫色背景,或更改数字颜色以及加号颜色?

4

1 回答 1

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]];
}
于 2013-10-17T14:46:58.823 回答