我正在尝试使用没有尾部的MediaItem创建一个JSQMessage。
我正在创建消息:
JSQMessage* imageMessage = [JSQMessage messageWithSenderId:fileMessage.sender.userId displayName:senderUser[@"nickname"] media:mediaItem];
但是我没有看到自定义气泡的选项。有没有办法做到这一点?
答案 0 :(得分:0)
您只需在文件顶部定义气泡样式即可。
incomingBubble = JSQMessagesBubbleImageFactory(bubble: UIImage.jsq_bubbleCompactTailless(), capInsets: UIEdgeInsets.zero, layoutDirection: UIApplication.shared.userInterfaceLayoutDirection).incomingMessagesBubbleImage(with: UIColor.jsq_messageBubbleBlue())
outgoingBubble = JSQMessagesBubbleImageFactory(bubble: UIImage.jsq_bubbleCompactTailless(), capInsets: UIEdgeInsets.zero, layoutDirection: UIApplication.shared.userInterfaceLayoutDirection).outgoingMessagesBubbleImage(with: UIColor.lightGray)