Core
-
A custom collection view layout designed to present items in a grid-like format, similar to UITableView, while aligning content to either the leading or trailing edge of the UICollectionView. This layout supports chat-style interfaces by preserving a consistent content offset from the bottom. It also accommodates self-sizing cells and supplementary views, ensuring dynamic and responsive content presentation.
Custom Properties:
CollectionViewChatLayout.delegate
CollectionViewChatLayout.settings
CollectionViewChatLayout.keepContentOffsetAtBottomOnBatchUpdates
CollectionViewChatLayout.processOnlyVisibleItemsOnAnimatedBatchUpdates
CollectionViewChatLayout.keepContentAtBottomOfVisibleArea
CollectionViewChatLayout.visibleBounds
CollectionViewChatLayout.layoutFrame
Custom Methods:
CollectionViewChatLayout.getContentOffsetSnapshot(...)
CollectionViewChatLayout.restoreContentOffset(...)
CollectionViewChatLayout.reconfigureItems(...)
See moreCollectionViewChatLayout.indexPathForItePinnedAt(...)
Declaration
Swift
@MainActor open class CollectionViewChatLayout : UICollectionViewLayout
-
See moreCollectionViewChatLayout
delegateDeclaration
Swift
@MainActor public protocol ChatLayoutDelegate : AnyObject
-
Custom implementation of
See moreUICollectionViewLayoutAttributes
Declaration
Swift
@MainActor public final class ChatLayoutAttributes : UICollectionViewLayoutAttributes
-
See moreCollectionViewChatLayout
settings.Declaration
Swift
public struct ChatLayoutSettings : Equatable, Sendable
-
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, Sendable
-
Custom implementation of
See moreUICollectionViewLayoutInvalidationContext
Declaration
Swift
@MainActor public final class ChatLayoutInvalidationContext : UICollectionViewLayoutInvalidationContext
-
Type of the item supported by
See moreCollectionViewChatLayout
Declaration
Swift
public enum ItemKind : CaseIterable, Hashable, Sendable
-
Represents desired item size.
See moreDeclaration
Swift
public enum ItemSize : Hashable, Sendable
-
Represent item alignment in collection view layout
See moreDeclaration
Swift
public enum ChatItemAlignment : Hashable, Sendable
-
Represents pinning behavour of the element.
See moreDeclaration
Swift
public enum ChatItemPinningType : Hashable, Sendable
-
Represents the point in time when
See moreCollectionViewChatLayout
asks about layout attributes modification.Declaration
Swift
public enum InitialAttributesRequestType : Hashable