FUIItemCollectionViewCell

@IBDesignable
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 false

    Declaration

    Swift

    public var isPreservingImageSpacing: Bool { get set }
  • ImageView of FUIItemCollectionViewCell.

    Declaration

    Swift

    @available(*, deprecated, renamed: "detailImageView")
    @IBInspectable
    public var contentImageView: FUIImageView { get }
  • Label of FUIItemCollectionViewCell.

    Declaration

    Swift

    @available(*, deprecated, renamed: "title")
    public var titleLabel: FUIText { get }
  • Image of FUIItemCollectionViewCell

    Declaration

    Swift

    @available(*, deprecated, renamed: "detailImageView")
    @IBInspectable
    public var contentImage: UIImage? { get set }
  • Title of FUIItemCollectionViewCell

    Declaration

    Swift

    @available(*, deprecated, renamed: "title")
    @IBInspectable
    public var titleText: String? { get set }
  • Primary button of FUIItemCollectionViewCell. Button width cannot exceed 110 points. Set the actionLayout property to .single or .double to show the button.

    Declaration

    Swift

    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 the actionLayout property to .double to show the button.

    Declaration

    Swift

    public var secondaryAction: FUIButton { get }
  • The layout of the action buttons within the cell. The default value is .none

    Declaration

    Swift

    public var actionLayout: FUIControlLayout { get set }