FUIListCardView

open class FUIListCardView<ItemIdentifier> : FUICardBaseContainer<FUICardHeaderView, FUIListCardContentView<ItemIdentifier>>, FUICardHeaderViewComponent where ItemIdentifier : Hashable, ItemIdentifier : Identifiable
extension FUIListCardView: FUIListCardComponent

Base container for showing business object header information.

Example Initialization and Configuration:

let view = FUIListCardView<ItemIdentifier>()
view.detailImageView.image = UIImage(named: "imageName")
view.title = "Title"
view.primaryButton.isHidden = false
view.primaryAction.setTitle("Primary", for: .normal)
view.secondaryAction.isHidden = false
view.secondaryAction.setTitle("Secondary", for: .normal)
view.overflowAction.isHidden = false
view.overflowAction.setImage(UIImage(systemName: "ellipsis"), for: .normal)
view.register(cellClass: AnyClass?, forCellReuseIdentifier: "reuseIdentifier")
view.cellProvider = ((UITableView, IndexPath, ItemIdentifier) -> UITableViewCell)
view.setItems([ItemIdentifier])
view.cellTappedHandler = ...

Theming

Supported TEXT class paths:

fdlFUICardHeaderView_title {} fdlFUIListCardView_overflowAction {} fdlFUIListCardView_primaryAction {} fdlFUIListCardView_secondaryAction {}

Supported TEXT properties:

font-color: Color; font-style: UIFontTextStyle; text-align: NSTextAlignment;

Supported IMAGE class paths:

fdlFUIListCardView_detailImageView {}

Supported IMAGE properties:

tint-color: Color;

  • nodoc:

    Declaration

    Swift

    open override func prepareForReuse()
  • UIImageView displaying detailImage content. Will be rendered in view hierarchy.

    Declaration

    Swift

    public var detailImageView: FUIImageView { get }
  • Multiline text property configuration for title content.

    Declaration

    Swift

    public var title: FUIMultiLineText { get set }
  • UIButton for overflow action

    Declaration

    Swift

    public var overflowAction: FUIButton { get }
  • Container for list card content

    Declaration

    Swift

    public var tableView: UITableView { get }
  • Cell tapped action closure

    Declaration

    Swift

    public var cellTappedHandler: ((IndexPath, ItemIdentifier) -> Void)? { get set }
  • Diffable data source for list card table view

    Declaration

    Swift

    public var dataSource: UITableViewDiffableDataSource<Int, ItemIdentifier>! { get set }
  • Cell provider for list card table view

    Declaration

    Swift

    public var cellProvider: ((UITableView, IndexPath, ItemIdentifier) -> UITableViewCell)? { get set }
  • Registers a class to use in list card content table cells.

    Declaration

    Swift

    public func register(_ cellClass: AnyClass?, forCellReuseIdentifier identifier: String)
  • Set the items with the specified identifiers to the snapshot.

    Declaration

    Swift

    public func setItems(_ items: [ItemIdentifier])
  • Adds the items with the specified identifiers to the snapshot.

    Declaration

    Swift

    public func appendItems(_ items: [ItemIdentifier])
  • Deletes the items with the specified identifiers from the snapshot.

    Declaration

    Swift

    public func deleteItems(_ items: [ItemIdentifier])
  • Deletes all of the items from the snapshot.

    Declaration

    Swift

    public func deleteAllItems()
  • Inserts the provided items immediately before the item with the specified identifier in the snapshot.

    Declaration

    Swift

    public func insertItems(_ items: [ItemIdentifier], beforeItem: ItemIdentifier)
  • Inserts the provided items immediately after the item with the specified identifier in the snapshot.

    Declaration

    Swift

    public func insertItems(_ items: [ItemIdentifier], afterItem: ItemIdentifier)
  • Moves the item from its current position in the snapshot to the position immediately before the specified item.

    Declaration

    Swift

    public func moveItem(_ item: ItemIdentifier, beforeItem: ItemIdentifier)
  • Moves the item from its current position in the snapshot to the position immediately after the specified item.

    Declaration

    Swift

    public func moveItem(_ item: ItemIdentifier, afterItem: ItemIdentifier)
  • Reloads the data within the specified items in the snapshot.

    Declaration

    Swift

    public func reloadItems(_ items: [ItemIdentifier])