我想发送我的信息,我知道它是通过
override func didPressSendButton(button: UIButton!, withMessageText text: String!, senderId: String!, senderDisplayName: String!, date: NSDate!) {
let message = JSQMessage(senderId: "alizade@my.co", senderDisplayName: "The Flash", date: NSDate(), text: text)
// SENDING CODE HERE
}
这个功能,但我不知道如何在按下发送按钮时发送它。
我搜索并找到了这个例子:
OneMessage.sendMessage(text, to: recipient.jidStr, completionHandler: { (stream, message) -> Void in
JSQSystemSoundPlayer.jsq_playMessageSentSound()
self.finishSendingMessageAnimated(true)
})
但就我而言,我没有 .sendMessage 方法。有什么建议么?