AttachmentManager
open class AttachmentManager : NSObject, InputPlugin
extension AttachmentManager: UICollectionViewDataSource, UICollectionViewDelegateFlowLayout
-
Declaration
Swift
public enum Attachment
-
A protocol that can recieve notifications from the
AttachmentManager
Declaration
Swift
open weak var delegate: AttachmentManagerDelegate?
-
A protocol to passes data to the
AttachmentManager
Declaration
Swift
open weak var dataSource: AttachmentManagerDataSource?
-
Declaration
Swift
open lazy var attachmentView: AttachmentCollectionView { get set }
-
The attachments that the managers holds
Declaration
Swift
private(set) public var attachments: [AttachmentManager.Attachment] { get set }
-
A flag you can use to determine if you want the manager to be always visible
Declaration
Swift
open var isPersistent: Bool { get set }
-
A flag to determine if the AddAttachmentCell is visible
Declaration
Swift
open var showAddAttachmentCell: Bool { get set }
-
The color applied to the backgroundColor of the deleteButton in each
AttachmentCell
Declaration
Swift
open var tintColor: UIColor { get }
-
Declaration
Swift
public override init()
-
Declaration
Swift
open func reloadData()
-
Invalidates the
AttachmentManagers
session by removing all attachmentsDeclaration
Swift
open func invalidate()
-
Appends the object to the attachments
Declaration
Swift
@discardableResult open func handleInput(of object: AnyObject) -> Bool
Parameters
object
The object to append
-
Performs an animated insertion of an attachment at an index
Declaration
Swift
open func insertAttachment(_ attachment: Attachment, at index: Int)
Parameters
index
The index to insert the attachment at
-
Performs an animated removal of an attachment at an index
Declaration
Swift
open func removeAttachment(at index: Int)
Parameters
index
The index to remove the attachment at
-
Declaration
Swift
final public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
-
Declaration
Swift
final public func numberOfItems(inSection section: Int) -> Int
-
Declaration
Swift
final public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
-
Declaration
Swift
final public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
-
Declaration
Swift
final public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
-
Declaration
Swift
open func createAttachmentCell(in collectionView: UICollectionView, at indexPath: IndexPath) -> AttachmentCell