FUIBaseCollectionViewCell

open class FUIBaseCollectionViewCell : UICollectionViewCell

A base class of UICollectionViewCell which exposes properties for displaying an accessory view, and for displaying cell borders.

Theming

Supported style classes

fdlFUIBaseCollectionViewCell
fdlFUIBaseCollectionViewCell_selectedBackgroundView
  • Reuse identifier @return convenience reuseIdentifier

    Declaration

    Swift

    open class var reuseIdentifier: String { get }
  • Indicates whether a tap action will result in a persistent cell selection background, or a momentary highlight.

    Important

    does not affect the behavior of isSelected

    Declaration

    Swift

    public var isMomentarySelection: Bool
  • The type of standard accessory view the cell should use (normal state).

    The behavior of this view should imitate that of UITableViewCell.accessoryType.

    The accessory view appears in the right side of the cell in the collection view’s normal (default) state. The standard accessory views include the disclosure chevron; for a description of valid accessoryType constants, see UITableViewCellAccessoryType. The default is none. If a custom accessory view is set through the accessoryView property, the value of this property is ignored.

    Declaration

    Swift

    @IBInspectable
    open var accessoryType: UITableViewCellAccessoryType { get set }
  • The set of edges of the cell, which should display a border line.

    Defaults to .none.

    Important

    It is typically necessary to set the layoutMargins property for the FUIAccessoryCollectionViewCell when showing left or right edge borders.
     cell.borders = [.top, .left]
     cell.layoutMargins = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
    

    Declaration

    Swift

    public var borders: UIRectEdge { get set }
  • The background color of all border lines in the cell.

    Defaults to FUIColorStyle.line

    To set unique color properties for a specific edge, access the view for the border line directly. (e.g.: topBorder.backgroundColor = .darkGray)

    Declaration

    Swift

    public var borderColor: UIColor { get set }
  • The widths of the cell’s borders.

    The width of the border line on each edge of the cell, facing inward towards the center of the cell. Only positive values are used; negative values will be read as absolute values, using abs(value).

    The getter for this property constructs a UIEdgeInsets struct from the current topBorderWeight, leftBorderWeight, bottomBorderWeight, and rightBorderWeight property values. The setter for this property updates the values for those properties, respectively.

    Important

    The width value for an edge is ignored, unless that edge is included in the cell’s borders option set.

    Declaration

    Swift

    public var borderWeights: UIEdgeInsets { get set }
  • The width value for the top border view.

    Defaults to 0.6

    Declaration

    Swift

    public var topBorderWeight: CGFloat { get set }
  • The width value for the left border view.

    Defaults to 0.6

    Declaration

    Swift

    public var leftBorderWeight: CGFloat { get set }
  • The width value for the bottom border view.

    Defaults to 0.6

    Declaration

    Swift

    public var bottomBorderWeight: CGFloat { get set }
  • The width value for the right border view.

    Defaults to 0.6

    Declaration

    Swift

    public var rightBorderWeight: CGFloat { get set }
  • View for top border on the cell.

    Declaration

    Swift

    public private(set) var topBorder: UIView { get }
  • View for left border on the cell.

    Declaration

    Swift

    public private(set) var leftBorder: UIView { get }
  • View for bottom border on the cell.

    Declaration

    Swift

    public private(set) var bottomBorder: UIView { get }
  • View for right border on the cell.

    Declaration

    Swift

    public private(set) var rightBorder: UIView { get }