Below code works on iOS version 9.x or less, for some reason this does not work if iOS 10
if([MFMessageComposeViewController canSendText])
{
controller.body = message;
NSString *tel = pContact.tlc;
controller.recipients = pContact.tlc?@[tel]:nil;
controller.messageComposeDelegate = self;
controller.navigationBar.tintColor = [UIColor whiteColor];
controller.navigationBar.barTintColor = [UIColor blueColor];
[self presentViewController:controller animated:YES completion:nil];
}
is it broken or did some thing change. Not sure whats missing here. I am in the dark (pitch black)
EDIT: I tried to use some test code on a new empty single view project and I am getting the same problems.
@IBAction func SMS(_ sender: AnyObject) {
let composeVC = MFMessageComposeViewController()
composeVC.messageComposeDelegate = self
// Configure the fields of the interface.
composeVC.recipients = ["5555555555"]
composeVC.body = "Hello from California!"
composeVC.navigationBar.tintColor = UIColor.green
composeVC.navigationBar.barTintColor = UIColor.purple
// Present the view controller modally.
self.present(composeVC, animated: true, completion: nil)
}
Edit: UINavigationBar appearance can set the color in a test App for the background or barTint but I am still unable to set the text color for the test app. The app I am working on uses the UINavigationBar appearance already to set the navbar color across the app, but this is not affecting the navbar for the SMS as it come up white background and white text. not able to change the text color or background color make this view un-usable.