答案 0 :(得分:0)
似乎LabelAlignment
类进行了更改。它不再具有预定义的.messageLeading
,而是具有textAlignment的属性作为LabelAlignment
对象的一部分。如果按住Command
并单击LabelAlignment
,则可以看到其定义。
public var textAlignment: NSTextAlignment
public var textInsets: UIEdgeInsets
因此,您所需要做的就是调整对新构造函数的调用。
func cellTopLabelAlignment(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LabelAlignment {
if isFromCurrentSender(message: message) {
return LabelAlignment(textAlignment: NSTextAlignment.left, textInsets: UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10))
}
return LabelAlignment(textAlignment: NSTextAlignment.right, textInsets: UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10))
}
如果要找出每个发行版中已完成的所有更改,请查看ChangeLog here
祝你好运