application tried to present a nil modal view controller on target code example
Example: application tried to present a nil modal view controller on target
if MFMailComposeViewController.canSendMail() {
// Send mail code
}
if MFMailComposeViewController.canSendMail() {
// Send mail code
}