FUIImageCollectionItemView

open class FUIImageCollectionItemView : FUIDrawingView, FUIDetailImageViewComponent

View component of FUIImageCollectionViewCell. Typically not used directly by developer.

Usage

let itemView = FUIImageCollectionItemView()
itemView.detailImageView.image = UIImage(named: "profile")
// To enable a default gradient layer behind the placeholder text.
itemView.detailImageView.isGradientLayerEnabled = true
// Set placeholder text.
itemView.detailImageView.placeholder.text = "This is a placeholder"
itemView.detailImageViewSize = CGSize(width: 90, height: 90)

Theming

nuiClass:

fdlFUIImageCollectionItemView {}

Supported IMAGE class paths:

fdlFUIImageCollectionItemView_detailImageView {}

Supported IMAGE properties:

tint-color: Color;
  • FUIPlaceholderImageView that shows the image. Optional FUIText intended to show placeholder text is available.

    Design Language Specifications:

    • Images can have rounded corners or be circular, as set in the FUIImageCollectionViewCell dataSource.
    • Placeholder should be two characters. By default, the style is set to regular System Font 22, with color primary1, limited to one line, and centered. Placeholder will be shown if there is no image set.

    Declaration

    Swift

    public var detailImageView: FUIImageView
  • UIImage shown within the detailImageView

    Declaration

    Swift

    public var detailImage: UIImage? { get set }
  • A CGSize for the detailImageView. The FUIImageCollectionViewCell sets the size based on the itemSize. By default, the size is CGSize(width: 60, height: 60)

    Design Language Specifications:

    • FUICollectionCellSize.small configures the size to have a range of 60 to 90 points for the width and height.
    • FUICollectionCellSize.standard configures the size to have a width of 110 points and a height between 90 to 110 points.

    Declaration

    Swift

    public var detailImageViewSize: CGSize { get set }