Do I have to dismiss a MFMessageComposeViewController in its didFinishWithResult delegate method?

别来无恙 提交于 2019-12-22 10:33:52

问题


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

Is the MFMessageComposeViewController only for sending one-off messages?

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

Thanks for the help.

来源:https://stackoverflow.com/questions/26345564/do-i-have-to-dismiss-a-mfmessagecomposeviewcontroller-in-its-didfinishwithresult

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!