🎉 This version brings a huge number of API breaking changes necessary for performance and the longevity of this project. This also sets a baseline for stable MessageKit API.
Below we've included a changelog and we've tried our best to fully document all API changes. If you're having trouble migrating from an earlier version of MessageKit, please open a GitHub issue and we'll do our best to point you in the right direction.
This release would not have been possible without the help of @zhongwuzw 🙇 🙇 🙇.
He contributed a large number of bug fixes and performance improvements to get MessageKit to where it is today. I'd like to also thank the other core team members @nathantannar4 and @cwalo for their continued support. And of course thanks to the rest of the MessageKit contributors making this project possible 💯
Added
-
Breaking Change Added new
MessagesDataSource
delegate methods,numberOfSections(in)
andnumberOfItems(inSection:in)
.
#601 by @SD10, @zhongwuzw. -
Breaking Change Added new protocol
MediaItem
as the associated value for the
MessageData.video
andMessageData.photo
cases.
#587 by @SD10. -
Breaking Change Added new protocol
LocationItem
as the associated value for
theMessageData.location
case.
#587 by @SD10. -
Breaking Change Added new
DetectorType
called.transitInformation
to message label.
#520 by @nosarj. -
Breaking Change Added
.custom(Any?)
case toMessageData
.
#498 by @SD10. -
Breaking Change Added
.messageLabelTop
case toAvatarPosition.Vertical
enum.
#596 by @zhongwuzw -
Added
CellSizeCalculator
protocol that is responsible for sizing and configuring attributes of aMessageCollectionViewCell
.
#579 by @SD10. -
Added
MessageSizeCalculator
,MediaMessageSizeCalculator
,TextMessageSizeCalculator
, andLocationMessageSizeCalculator
classes that are responsible for sizing theMessagesCollectionViewCell
types provided by MessageKit.
#579 by @SD10. -
Added three new methods
cellTopLabelHeight(for:at:in)
,messageTopLabelHeight(for:at:in)
, andmessageBottomLabelHeight(for:at:in)
toMessagesLayoutDelegate
.
#580 by @SD10. -
Added new method
configureMediaMessageImageView(_:for:at:in)
to configure theUIImageView
of a
MediaMessageCell
asynchronously.
#592 by @zhongwuzw, @SD10 -
Added new
MessageContentCell
class andMessageReusableView
class.
#596 by @SD10.
Changed
-
Breaking Change Renamed
MessageData
enum toMessageKind
and changedMessageType
'sdata
property name tokind
.
#658 by @zhongwuzw. -
Breaking Change Changed the
messageFooterView(for:in)
andmessageHeaderView(for:in)
methods of
MessagesDisplayDelegate
by removing themessage
parameter.
#615 by @SD10. -
Breaking Change Changed the
footerViewSize(for:in)
andheaderViewSize(for:in)
methods ofMessagesLayoutDelegate
by removing theMessageType
andIndexPath
parameters and replacing them with a newsection: Int
parameter.
#615 by @SD10. -
Breaking Change The reuse identifiers of all
MessageReusableView
s andMessageCollectionViewCell
s have been
changed to match their class name exactly.
#615 by @SD10. -
Breaking Change
MessageHeaderView
andMessageFooterView
now subclassMessageReusableView
class.
#596 by @SD10. -
Breaking Change Renamed
MessageCollectionViewCell
toMessageContentCell
.
TheMessageCollectionViewCell
class is now a bare bones subclass.
#596 by @SD10. -
Breaking Change Changed
LabelAlignment
to be astruct
with properties of
textAlignment: NSTextAlignment
andtextInsets: UIEdgeInsets
to position the text in thecellTopLabel
andcellBottomLabel
.
#580 by @SD10. -
Breaking Change The type of
cellTopLabel
andcellBottomLabel
has been changed toInsetLabel
.
#580 by @SD10. -
Breaking Change Renamed
cellTopLabel
tomessageTopLabel
and renamedcellBottomLabel
tomessageBottomLabel
.
#659 by @SD10. -
Breaking Change Renamed the
didTapTopLabel
anddidTapBottomLabel
methods ofMessageCellDelegate
todidTapMessageTopLabel
anddidTapMessageBottomLabel
.
#659 by @SD10. -
Breaking Change Renamed
cellBottomLabelAttributedText
method ofMessagesDataSource
tomessageBottomLabelAttributedText
.
#659 by @zhongwuzw. -
The
MessageData.emoji
case no longer uses a default font of 2x themessageLabelFont
size.
You must now set this font explicitly through theemojiMessageSizeCalculator
onMessagesCollectionViewFlowLayout
.
#530 by @SD10. -
Changed the
contentMode
of theUIImageView
forMediaMessageCell
to be.scaleAspectFill
.
#587 by @SD10. -
The result of the
MessagesDisplayDelegate
methodtextColor(for message:...)
no longer applies to.attributedText
case ofMessageData
.
#625 by @cwalo. -
Removed the explicit height constraint from the
separatorLine
inMessageInputBar
.
#667 by @zhongwuzw
Removed
-
Breaking Change Removed
NSLayoutConstraintSet
by changing access control frompublic
tointernal
.
#607 by @zhongwuzw. -
Breaking Change Removed the
showsDateHeaderAfterTimeInterval
property ofMessagesCollectionView
.
#615 by @SD10. -
Breaking Change Removed the
reuseIdentifer
method fromMessageCollectionViewCell
,TextMessageCell
,
LocationMessageCell
,MediaMessageCell
, andMessageContentCell
.
#615 by @SD10. -
Breaking Change Removed the
CollectionViewReusable
protocol.
#615 by @SD10. -
Breaking Change Removed
MessageHeaderView
andMessageFooterView
in favor ofMessageReusableView
.
#615 by @SD10. -
Breaking Change Removed
numberOfMessages(in)
method ofMessagesDataSource
, instead please usenumberOfSections(in)
andnumberOfItems(inSection:in)
.
#601 by @SD10, @zhongwuzw. -
Breaking Change Removed the
messageLabelFont
property fromMessagesCollectionViewFlowLayout
.
You can now set this property throughtextMessageSizeCalculator
property.
#579 by @SD10. -
Breaking Change Removed
MessageDateHeaderView
class in favor of usingcellTopLabel
.
#659 by @zhongwuzw.
Fixed
- Fixed equality checking on
MessagesCollectionViewLayoutAttributes
.
#593 by @zhongwuzw, @SD10