iOS   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – MSMessagesAppViewController didStartSending重写方法未在SEND按钮上调用大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

我创建了一个imessage应用程序,用于从图像发送MSSticker转换. 我已经实现了以下重写方法: override func didStartSending(_ message: MSmessage, conversation: MSConversation) {         // Called when the user taps the send button. // H
我创建了一个imessage应用程序,用于从图像发送MSSticker转换.

我已经实现了以下重写方法

override func didStartSending(_ message: MSmessage,conversation: MSConversation) {
        // Called when the user taps the send button.

    // Here I am adding reWARDs points on every sticker sending
    }

在iOS 10.2.0中它运行良好意味着奖励积分被添加但是在更新到10.2.1之后突然停止并且现在我不再回调到didStartSending方法也没有调用didCancelSending.

这是iOS 10.2.1错误还是@R_398_10675@用任何应用程序设置来获得上述方法通知

任何帮助将不胜感激.

解决方法

在新的更新中,您必须使用以下方法发送消息.如果你没有调用下面的方法,那么func didStartSending将不会调用.

func insert(_ message: MSmessage,completionHandler: ((Error?) -> Void)? = nil)

并检查下面的事情

如果控制器的presentationStyle属性是MSmessagesAppPresentationStyle.transcript,或者其presentationContext属性是MSmessagesAppPresentationContext.media,则不调用方法.

大佬总结

以上是大佬教程为你收集整理的ios – MSMessagesAppViewController didStartSending重写方法未在SEND按钮上调用全部内容,希望文章能够帮你解决ios – MSMessagesAppViewController didStartSending重写方法未在SEND按钮上调用所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。