In storyboard I can setup a segue from a button to a UIViewController and make it appear modally. This works fine. However when I change the class in storyboard from UIViewController to MFMailComposeViewController, it does not work at all. All that appears is a navigation bar at the top with the rest of the display being filled with black. Am I taking the wrong approach?
In storyboard I can setup a segue from a button to a UIViewController and
Share
I had a similar problem with
ABPeoplePickerNavigationControllerand I could not seem to figure out what the problem was either. You can eitherFall back to a
IBActionand create theMFMailComposeViewControllerinstance your self and display it.If you want to keep using Storyboards, which I think is desirable then you might create a wrapper-class that internally instantiates the
MFMailComposeViewControllerand then functions as a proxy object and thus propagatesviewDid***andviewWill***-methods to the wrapped class and also returning the wrapped VC’s view in a readonlyviewproperty… You get the idea.