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 ofisSelected
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, seeUITableViewCellAccessoryType
. The default isnone
. If a custom accessory view is set through theaccessoryView
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 thelayoutMargins
property for theFUIAccessoryCollectionViewCell
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 aUIEdgeInsets
struct from the currenttopBorderWeight
,leftBorderWeight
,bottomBorderWeight
, andrightBorderWeight
property values. Thesetter
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’sborders
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 }