FUIBaseCollectionViewCell
@MainActor
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
reuseIdentifierDeclaration
Swift
@MainActor 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 ofisSelectedDeclaration
Swift
@MainActor 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
accessoryTypeconstants, seeUITableViewCellAccessoryType. The default isnone. If a custom accessory view is set through theaccessoryViewproperty, the value of this property is ignored.Declaration
Swift
@IBInspectable @MainActor 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 thelayoutMarginsproperty for theFUIAccessoryCollectionViewCellwhen showing left or right edge borders.cell.borders = [.top, .left] cell.layoutMargins = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)Declaration
Swift
@MainActor public var borders: UIRectEdge { get set } -
The background color of all border lines in the cell.
Defaults to
FUIColorStyle.lineTo set unique color properties for a specific edge, access the view for the border line directly. (e.g.:
topBorder.backgroundColor = .darkGray)Declaration
Swift
@MainActor 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
getterfor this property constructs aUIEdgeInsetsstruct from the currenttopBorderWeight,leftBorderWeight,bottomBorderWeight, andrightBorderWeightproperty values. Thesetterfor 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’sbordersoption set.Declaration
Swift
@MainActor public var borderWeights: UIEdgeInsets { get set } -
The width value for the top border view.
Defaults to
0.6Declaration
Swift
@MainActor public var topBorderWeight: CGFloat { get set } -
The width value for the left border view.
Defaults to
0.6Declaration
Swift
@MainActor public var leftBorderWeight: CGFloat { get set } -
The width value for the bottom border view.
Defaults to
0.6Declaration
Swift
@MainActor public var bottomBorderWeight: CGFloat { get set } -
The width value for the right border view.
Defaults to
0.6Declaration
Swift
@MainActor public var rightBorderWeight: CGFloat { get set }
-
View for top border on the cell.
Declaration
Swift
@MainActor public private(set) var topBorder: UIView { get } -
View for left border on the cell.
Declaration
Swift
@MainActor public private(set) var leftBorder: UIView { get } -
View for bottom border on the cell.
Declaration
Swift
@MainActor public private(set) var bottomBorder: UIView { get } -
View for right border on the cell.
Declaration
Swift
@MainActor public private(set) var rightBorder: UIView { get }