2

アプリケーション内でチャットを処理するためにJSQMessages ( https://github.com/jessesquires/JSQMessagesViewController ) を使用しています。

メッセージが配信された場合、メッセージが相手側で読み取られた場合、または配信に問題があった場合 (他のチャット アプリケーションで実行されるのと同じ機能)、JSQMessages UI 内に表示したいと思います。

この情報を表示するようにカスタマイズするにはどうすればよいですか? 私の目標は、メッセージを配信できなかった場合に、チェック、ダブル チェック、または赤い感嘆符を追加することです。

JSQMessages を使用してこれを達成する方法はありますか?

どうもありがとう、

ダニエル

4

1 に答える 1

2

You can add a status enum in your JSQMessage model class to represent different delivery status flags. and in your JSQMessagesController subclass you can override this method :

- (NSAttributedString *)collectionView:(JSQMessagesCollectionView *)collectionView attributedTextForCellBottomLabelAtIndexPath:(NSIndexPath *)indexPath

and return an NSAttributedString matching the delivery flag you want to show.

Bear in mind that this has nothing to do with the backend. JSQMessages is for UI only so backend work has to be done by you.

you can get more information here : https://github.com/jessesquires/JSQMessagesViewController/issues/190

于 2015-03-09T09:26:03.263 に答える