Andrew Campoli
Andrew Campoli

Reputation: 222

MFMessageComposeViewController presented without recipient field (iOS 11)

When I present MFMessageComposeViewController on an iOS 11 device it's presented mysteriously missing the recipient field. The same code works on an iPhone 6 running iOS 10.

enter image description here

Upvotes: 3

Views: 412

Answers (1)

Andrew Campoli
Andrew Campoli

Reputation: 222

After a lot of messing around, I found that if I remove my project-wide hiding of the status bar in my info.plist: View controller-based status bar appearance: NO and instead manually prefer that the status bar is hidden in each of my own view controllers I got the correct behavior. This seems like a bug to me so I plan on filing a radar.

You need to set the below in each of your UIViewController subclasses if you want to retain the status bar behavior:

override var prefersStatusBarHidden: Bool {
    return true
}

Upvotes: 3

Related Questions