Search code examples
iosobjective-cxcodemfmessagecomposeviewcontroller

Graphic issue presenting MFMessageComposeViewController


I've this strange issue when i'm presenting a MFMessageComposeViewController in my app!

I don't know what this black bar is and i'm unable to remove the app logo from the NavigationBar.

The MessageCompose view controller draws over my nav bar

And here is the code for presenting the controller

MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
[[messageController navigationBar] setBarTintColor:SMAN_ORANGE_COLOR];
[[messageController navigationBar] setTintColor:[UIColor whiteColor]];
messageController.messageComposeDelegate = self;
[messageController setRecipients:recipents];
[messageController setBody:message];

// Present message view controller on screen
[self presentViewController:messageController animated:YES completion:nil];

Solution

  • I solve the issue subclassing my UINavigationController and changing the appearance of it with [UINavigationBar appearanceWhenContainedIn:[myNavControllerSubclass class], nil]