FUICardTableViewCell
open class FUICardTableViewCell : FUIBaseDrawingTableViewCell<FUICardView>
Showing card view as inner view for table view cell.
Example Initialization and Configuration:
let cell = tableView.dequeueReusableCell(withIdentifier: FUICardTableViewCell.reuseIdentifier,
for: indexPath) as! FUICardTableViewCell
// set up main header
cell.mainHeader.detailImageView.image = UIImage(named: "imageName")
cell.mainHeader.title.text = "Title"
cell.mainHeader.subtitle.text = "Subtitle"
cell.mainHeader.overflowAction.isHidden = false
cell.mainHeader.counter.text = "3 of 36"
// set up the icon stack
let dot = FUIAttributedImage(image: FUIIconLibrary.indicator.dot.withRenderingMode(.alwaysTemplate))
let attachment = FUIAttributedImage(image: FUIIconLibrary.indicator.attachment.withRenderingMode(.alwaysTemplate))
mainHeader.iconImages = [dot, attachment, "1"]
// set up media view
cell.mediaView.detailImageView.image = UIImage(named: "imageName")
cell.mediaView.title.text = "Title"
// set a customized height if needed
mediaView.detailImageViewHeight = 300
// set up extended view
cell.extHeader.row1.contents = [
FUILabelItem(text: "Negative", image: UIImage(systemName: "exclamationmark.triangle.fill"), alignment: .leading),
FUILabelItem(text: "Critical"),
FUILabelItem(text: "label")
]
cell.extHeader.row1.separatorStyle = .automatic
cell.extHeader.row2.contents = [FUIRatingControl(style: .standard)]
cell.extHeader.row3.contents = [...]
let dollars = FUIKPIUnitItem(string: "$")
let metric = FUIKPIMetricItem(string: "888.88")
let unit = FUIKPIUnitItem(string: "M")
cell.extHeader.kpiItems = [dollars, metric, unit]
cell.extHeader.kpiFootnote.text = "Label"
// set up body
cell.body.contents = [
...
]
// set up footer
cell.footer..primaryButton.isHidden = false
cell.footer..primaryAction.setTitle("Primary", for: .normal)
cell.footer..secondaryAction.isHidden = false
cell.footer..secondaryAction.setTitle("Secondary", for: .normal)
-
Card’s media view
Declaration
Swift
public var mediaView: FUICardMediaView { get }
-
Card’s main header
Declaration
Swift
public var mainHeader: FUICardMainHeaderView { get }
-
Card’s extended header
Declaration
Swift
public var extHeader: FUICardExtHeaderView { get }
-
Card’s body
Declaration
Swift
public var body: FUICardBaseDrawingView { get }
-
Card’s footer
Declaration
Swift
public var footer: FUICardFooterView { get }