FUIKPIProgressCardCollectionViewCell

open class FUIKPIProgressCardCollectionViewCell : FUIBaseDrawingCollectionViewCell<FUIKPIProgressCardView>

UICollectionViewCell subclass for FUIKPIProgressCardView, where KPI values are centered in the card, inscribed within circular progress ring.

Developer should use the FUIKPIViewItem API set to build KPI content, and set to the kpiItems: [FUIKPIViewItem] property.

Extends FUIKPIProgressCardView API, by extension on FUIBaseDrawingCollectionViewCell.

Usage

let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIKPICardCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIKPICardCollectionViewCell
cell.title.text = "Completed"
cell.status.text = "Updated 20 min ago"
cell.kpiItems = [<#FUIKPIViewItem#>]
cell.progress = 0.6
return cell

Skeleton

cell.showSkeleton()
cell.hideSkeleton()

Theming

Supported TEXT class paths:

fdlFUIKPIProgressCardCollectionViewCell_title {}
fdlFUIKPIProgressCardCollectionViewCell_kpiUnitItem {}
fdlFUIKPIProgressCardCollectionViewCell_kpiMetricItem {}
fdlFUIKPIProgressCardCollectionViewCell_kpiFractionItem {}
fdlFUIKPIProgressCardCollectionViewCell_status {}

Supported TEXT properties:

font-color: Color;
font-style: UIFontTextStyle;
text-line-clamp: Integer;
text-align: NSTextAlignment;

Supported IMAGE class paths:

fdlFUIKPIProgressCardCollectionViewCell_kpiIconItem {}

Supported IMAGE properties:

tint-color: Color;
  • Float value from 0.0..1.0 to dipict the amount of progress displayed in the colored circle.

    Declaration

    Swift

    public var progress: Float { get set }