Core
-
A collection view layout designed to display items in a grid similar to
UITableView
, while aligning them to the leading or trailing edge of theUICollectionView
. This layout facilitates chat-like behavior by maintaining a constant content offset from the bottom. Additionally, it is capable of handling autosizing cells and supplementary views.Custom Properties:
CollectionViewChatLayout.delegate
CollectionViewChatLayout.settings
CollectionViewChatLayout.keepContentOffsetAtBottomOnBatchUpdates
CollectionViewChatLayout.processOnlyVisibleItemsOnAnimatedBatchUpdates
CollectionViewChatLayout.visibleBounds
CollectionViewChatLayout.layoutFrame
Custom Methods:
CollectionViewChatLayout.getContentOffsetSnapshot(...)
See moreCollectionViewChatLayout.restoreContentOffset(...)
Declaration
Swift
open class CollectionViewChatLayout : UICollectionViewLayout
-
See moreCollectionViewChatLayout
delegateDeclaration
Swift
public protocol ChatLayoutDelegate : AnyObject
-
Custom implementation of
See moreUICollectionViewLayoutAttributes
Declaration
Swift
public final class ChatLayoutAttributes : UICollectionViewLayoutAttributes
-
See moreCollectionViewChatLayout
settings.Declaration
Swift
public struct ChatLayoutSettings : Equatable
-
Represents content offset position expressed by the specific item and it offset from the top or bottom edge.
See moreDeclaration
Swift
public struct ChatLayoutPositionSnapshot : Hashable
-
Custom implementation of
See moreUICollectionViewLayoutInvalidationContext
Declaration
Swift
public final class ChatLayoutInvalidationContext : UICollectionViewLayoutInvalidationContext
-
Type of the item supported by
See moreCollectionViewChatLayout
Declaration
Swift
public enum ItemKind : CaseIterable, Hashable
-
Represents desired item size.
See moreDeclaration
Swift
public enum ItemSize : Hashable
-
Represent item alignment in collection view layout
See moreDeclaration
Swift
public enum ChatItemAlignment : Hashable
-
Represents the point in time when
See moreCollectionViewChatLayout
asks about layout attributes modification.Declaration
Swift
public enum InitialAttributesRequestType : Hashable