我已经向MFMessageViewController提供了以下代码。
class NoConnectionLostFilter(logging.Filter):
""" while issue not resolved https://github.com/channelcat/sanic/issues/959 """
def filter(record):
return not record.getMessage().startswith('Connection lost before response written')
logging.getLogger('root').addFilter(NoConnectionLostFilter)
并使用以下代码解雇。
extension TransactionResultViewController {
func showMessageComposeController() {
if MFMessageComposeViewController.canSendText() {
let messageComposeVc = MFMessageComposeViewController()
messageComposeVc.body = viewModel.offlinePayload
messageComposeVc.recipients = ["37245"]
messageComposeVc.messageComposeDelegate = self
self.present(messageComposeVc, animated: true, completion: nil)
}
}
}
有时MFMessageviewcontroller未显示,有时显示空白/黑屏。请帮忙。感谢