KWCollectionView

public class KWCollectionView : UIViewController
extension KWCollectionView: UICollectionViewDataSource
extension KWCollectionView: UICollectionViewDelegate
extension KWCollectionView: KeywordCellLayoutDelegate

This collection view is a container that displays and manages keywords

Customasible properties

  • The font of the label inside the keyword (default: system bold of size 14)

    Declaration

    Swift

    public var customFont: UIFont
  • The inset between every keyword (default: 10 points)

    Declaration

    Swift

    public var customSpacing: CGFloat
  • The corner radius of the keyword view (default: 14 points)

    Declaration

    Swift

    public var customCornerRadius: CGFloat
  • The background color of the keyword view

    Declaration

    Swift

    public var customBackgroundColor: UIColor
  • The color of the keyword cell border, if present

    Declaration

    Swift

    public var customTagBorderColor: UIColor?
  • The border of the keyword cell view

    Declaration

    Swift

    public var customTagBorderWidth: CGFloat?
  • The action embedded in the keyword: add, remove or no action (default: no action). (this changes the embedded icon)

    Declaration

    Swift

    public var action: ActionType

Class properties

  • The actual collectionView inside the controller, where every cell is a keyword

    Declaration

    Swift

    public var keywordsCollectionView: UICollectionView!
  • The custom cell layout of the single cell

    Declaration

    Swift

    public var keywordCellLayout: KeywordCellLayout!
  • If keywords in the collection are given an action of type “add”, a receiver can be automatically binded on this property

    Declaration

    Swift

    public var receiver: KWCollectionView?
  • A controller that confromed to be a delegate for the keywords collection view

    Declaration

    Swift

    public var delegate: KWCollectionViewDelegate?
  • The array containing all the keywords of the collection

    Declaration

    Swift

    public var keywords: [CMSCategory]

Lifecycle methods

Extension to UICollectionViewDataSource

Extension to UICollectionViewDelegate

Extension to KeywordCellLayoutDelegate

Extension to TagCellDelegate (action delegate)