FUIItemCollectionViewCell
@IBDesignable
@MainActor
open class FUIItemCollectionViewCell : FUIBaseItemCollectionViewCell<FUICollectionItemView>, FUIContentCopyable
UICollectionViewCell subclass used for displaying business objects in a collectionView.
Developer should use the FUICollectionItemView and FUIBaseItemCollectionViewCell API set to build the view.
Usage
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUICollectionItemCell.reuseIdentifier, for: indexPath) as! FUICollectionItemCell
cell.itemSize = .small
cell.detailImageView.image = UIImage(named: "profile")
cell.detailImageView.isCircular = true
cell.title.text = "Franck Syren"
cell.subtitle.text = "Java Developer"
cell.status.text = "Available"
cell.actionLayout = .pair
cell.primaryButton.setImage(img, for: .normal)
cell.secondaryButton.setImage(img, for: .normal)
return cell
Theming
nuiClass:
fdlFUIItemCollectionViewCell {}
Supported TEXT class paths:
fdlFUIItemCollectionViewCell_title {}
fdlFUIItemCollectionViewCell_subtitle {}
fdlFUIItemCollectionViewCell_status {}
fdlFUIItemCollectionViewCell_placeholder {}
Supported TEXT properties:
font-color: Color;
font-style: UIFontTextStyle;
text-line-clamp: Integer;
text-align: NSTextAlignment;
Supported IMAGE class paths:
fdlFUIItemCollectionViewCell_detailImageView {}
Supported IMAGE properties:
tint-color: Color;
-
Determines if cell will maintain the space for an image. By default, this property is set to
falseDeclaration
Swift
@MainActor public var isPreservingImageSpacing: Bool { get set } -
ImageView of
FUIItemCollectionViewCell.Declaration
Swift
@available(*, deprecated, renamed: "detailImageView") @IBInspectable @MainActor public var contentImageView: FUIImageView { get } -
Label of
FUIItemCollectionViewCell.Declaration
Swift
@available(*, deprecated, renamed: "title") @MainActor public var titleLabel: FUIText { get } -
Image of
FUIItemCollectionViewCellDeclaration
Swift
@available(*, deprecated, renamed: "detailImageView") @IBInspectable @MainActor public var contentImage: UIImage? { get set } -
Title of
FUIItemCollectionViewCellDeclaration
Swift
@available(*, deprecated, renamed: "title") @IBInspectable @MainActor public var titleText: String? { get set } -
Primary button of
FUIItemCollectionViewCell. Button width cannot exceed 110 points. Set theactionLayoutproperty to.singleor.doubleto show the button.Declaration
Swift
@MainActor public var primaryAction: FUIButton { get } -
Secondary button of
FUIItemCollectionViewCell. Total width of primary and secondary buttons cannot exceed 110 points. Secondary button will be hidden if width exceeds maximum. Set theactionLayoutproperty to.doubleto show the button.Declaration
Swift
@MainActor public var secondaryAction: FUIButton { get } -
The layout of the action buttons within the cell. The default value is
.noneDeclaration
Swift
@MainActor public var actionLayout: FUIControlLayout { get set }