ありがとう。出来た。今私はちょうどBubbleImageのメッセージを表示する方法を理解しなければなりません。何か案は ????
「オーバーライド」単語を削除すると、Xcodeエラーが消えます。
しかし、これは問題を引き起こします。
各メソッドをオーバーライドする必要があります。 などのように注意してください!と_。作業
:スウィフト3.0 & JSQMessagesViewController 7.3.4
// MARK: - JSQMessage
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
code
}
override func collectionView(_ collectionView: JSQMessagesCollectionView!, avatarImageDataForItemAt indexPath: IndexPath!) -> JSQMessageAvatarImageDataSource! {
code
}
override func collectionView(_ collectionView: JSQMessagesCollectionView!, messageBubbleImageDataForItemAt indexPath: IndexPath!) -> JSQMessageBubbleImageDataSource! {
code
}
override func collectionView(_ collectionView: JSQMessagesCollectionView!, messageDataForItemAt indexPath: IndexPath!) -> JSQMessageData! {
code
}
override func didPressSend(_ button: UIButton!, withMessageText text: String!, senderId: String!, senderDisplayName: String!, date: Date!) {
code
}
は 'オフ取り除く'関数のパラメータを入力した後、彼らはNULL可能ではありません!。少なくとも最新のJSQMessagesViewControllerバージョン。 – user28434
私はそれを試しましたが、助けになりませんでした。 –
'JSQMessagesViewController'を⌘-クリックして 'didPressSendButton'がそこに定義されていることを確認できますか? – user28434