ChatLayoutAttributes

public final class ChatLayoutAttributes : UICollectionViewLayoutAttributes

Custom implementation of UICollectionViewLayoutAttributes

  • Alignment of the current item. Can be changed within UICollectionViewCell.preferredLayoutAttributesFitting(...)

    Declaration

    Swift

    public var alignment: ChatItemAlignment
  • Inter item spacing. Can be changed within UICollectionViewCell.preferredLayoutAttributesFitting(...)

    Declaration

    Swift

    public var interItemSpacing: CGFloat
  • CollectionViewChatLayouts additional insets setup using ChatLayoutSettings. Added for convenience.

    Declaration

    Swift

    public internal(set) var additionalInsets: UIEdgeInsets { get }
  • UICollectionViews frame size. Added for convenience.

    Declaration

    Swift

    public internal(set) var viewSize: CGSize { get }
  • UICollectionViews adjusted content insets. Added for convenience.

    Declaration

    Swift

    public internal(set) var adjustedContentInsets: UIEdgeInsets { get }
  • CollectionViewChatLayouts visible bounds size excluding adjustedContentInsets. Added for convenience.

    Declaration

    Swift

    public internal(set) var visibleBoundsSize: CGSize { get }
  • CollectionViewChatLayouts visible bounds size excluding adjustedContentInsets and additionalInsets. Added for convenience.

    Declaration

    Swift

    public internal(set) var layoutFrame: CGRect { get }
  • Returns an exact copy of ChatLayoutAttributes.

    Declaration

    Swift

    public override func copy(with zone: NSZone? = nil) -> Any
  • Returns a Boolean value indicating whether two ChatLayoutAttributes are considered equal.

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool
  • ItemKind represented by this attributes object.

    Declaration

    Swift

    public var kind: ItemKind { get }