FUIImageCollectionItemView
@MainActor
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;
-
FUIPlaceholderImageViewthat shows the image. OptionalFUITextintended to show placeholder text is available.Design Language Specifications:
- Images can have rounded corners or be circular, as set in the
FUIImageCollectionViewCelldataSource. - 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
@MainActor public var detailImageView: FUIImageView - Images can have rounded corners or be circular, as set in the
-
UIImageshown within thedetailImageViewDeclaration
Swift
@MainActor public var detailImage: UIImage? { get set } -
A CGSize for the
detailImageView. TheFUIImageCollectionViewCellsets the size based on theitemSize. By default, the size isCGSize(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
@MainActor public var detailImageViewSize: CGSize { get set }