AttachmentManagerDataSource

public protocol AttachmentManagerDataSource : AnyObject

AttachmentManagerDataSource is a protocol to passes data to the AttachmentManager

  • The AttachmentCell for the attachment that is to be inserted into the AttachmentView

    Declaration

    Swift

    func attachmentManager(_ manager: AttachmentManager, cellFor attachment: AttachmentManager.Attachment, at index: Int) -> AttachmentCell

    Parameters

    manager

    The AttachmentManager

    attachment

    The object

    index

    The index in the AttachmentView

    Return Value

    An AttachmentCell

  • attachmentManager(_:sizeFor:at:) Default implementation

    The CGSize of the AttachmentCell for the attachment that is to be inserted into the AttachmentView

    Default Implementation

    Declaration

    Swift

    func attachmentManager(_ manager: AttachmentManager, sizeFor attachment: AttachmentManager.Attachment, at index: Int) -> CGSize?

    Parameters

    manager

    The AttachmentManager

    attachment

    The object

    index

    The index in the AttachmentView

    Return Value

    The size of the given attachment