MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc]init];
[UINavigationBar appearance].barTintColor = [UIColor colorWithRed:0.0f/255.0f green:127.0f/255.0f blue:254.0f/255.0f alpha:1.0];
[[messageController navigationBar] setTintColor: [UIColor whiteColor]];
messageController.messageComposeDelegate = self;
[messageController setBody:message];
[messageController navigationBar].translucent =NO;
[messageController.navigationBar setBarTintColor:[UIColor colorWithRed:0.0f/255.0f green:127.0f/255.0f blue:254.0f/255.0f alpha:1.0]];
// Present message view controller on screen
[self presentViewController:messageController animated:YES completion:^{
[messageController navigationBar].translucent = NO;
}];
我一直在使用這段代碼。請讓我知道是否有遺漏。如何更改mfmessagecomposeviewcontroller中導航欄的顏色,同時將其呈現在ios中9
請編輯您的帖子以使代碼可讀。提示:每行縮進4個空格形成一個代碼塊。 – Avi
完成編輯代碼。 –
嘗試移動將tintColor設置爲演示文稿的完成處理程序的行。 – Avi