Should I dismiss the MFMessageComposeViewController in the didFinishWithResult delegate method?

I'm trying to allow the user to send multiple text messages in a row in the MFMessageComposeViewController, but if I don't dismiss the controller in the didFinishWithResult delegate method, the Cancel button in the top right corner is disabled and the user has no way to exit the text message interface.

Is MFMessageComposeViewController only for sending one-time messages?

func messageComposeViewController(controller: MFMessageComposeViewController!, didFinishWithResult result: MessageComposeResult) {
  if result.value == MessageComposeResultCancelled.value {
    self.dismissViewControllerAnimated(true, completion: nil)
  }
}

      

Thanks for the help.

+3


source to share





All Articles