# Core

- `CollectionViewChatLayout`

  A collection view layout designed to display items in a grid similar to `UITableView`, while aligning them to the leading or trailing edge of the `UICollectionView`. 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(...)`

  `CollectionViewChatLayout.restoreContentOffset(...)`

  See more

  #### Declaration

  Swift

      open class CollectionViewChatLayout : UICollectionViewLayout

- `ChatLayoutDelegate`

  `CollectionViewChatLayout` delegate

  See more

  #### Declaration

  Swift

      public protocol ChatLayoutDelegate : AnyObject

- `ChatLayoutAttributes`

  Custom implementation of `UICollectionViewLayoutAttributes`

  See more

  #### Declaration

  Swift

      public final class ChatLayoutAttributes : UICollectionViewLayoutAttributes

- `ChatLayoutSettings`

  `CollectionViewChatLayout` settings.

  See more

  #### Declaration

  Swift

      public struct ChatLayoutSettings : Equatable

- `ChatLayoutPositionSnapshot`

  Represents content offset position expressed by the specific item and it offset from the top or bottom edge.

  See more

  #### Declaration

  Swift

      public struct ChatLayoutPositionSnapshot : Hashable

- `ChatLayoutInvalidationContext`

  Custom implementation of `UICollectionViewLayoutInvalidationContext`

  See more

  #### Declaration

  Swift

      public final class ChatLayoutInvalidationContext : UICollectionViewLayoutInvalidationContext

- `ItemKind`

  Type of the item supported by `CollectionViewChatLayout`

  See more

  #### Declaration

  Swift

      public enum ItemKind : CaseIterable, Hashable

- `ItemSize`

  Represents desired item size.

  See more

  #### Declaration

  Swift

      public enum ItemSize : Hashable

- `ChatItemAlignment`

  Represent item alignment in collection view layout

  See more

  #### Declaration

  Swift

      public enum ChatItemAlignment : Hashable

- `InitialAttributesRequestType`

  Represents the point in time when `CollectionViewChatLayout` asks about layout attributes modification.

  See more

  #### Declaration

  Swift

      public enum InitialAttributesRequestType : Hashable