ButtonTableViewCell

open class ButtonTableViewCell : UITableViewCell

The FUIMapDetailButtonTableViewCell is a UITableViewCell consisting of a FUIButton and a FUILabel within a vertical UIStackView.

Available:

  • button: An FUIButton with access to custom headline text and subheadline text.
  • buttonHeadlineText: A String to describe the main function of the button
  • buttonSubheadlineText: A String to add additional details to the buttonHeadlineText
  • descriptionLabel: An FUILabel used as a description beneath the button. The label can wrap up to 2 lines.

Initialization and Configuration:

Register the cell within the viewDidLoad method

self.tableView.register(FUIMapDetailButtonTableViewCell.self, forCellReuseIdentifier: FUIMapDetailButtonTableViewCell.reuseIdentifier)

Within the tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath):

let cell = tableView.dequeueReusableCell(withIdentifier: FUIMapDetailButtonTableViewCell.reuseIdentifier, for: indexPath) as! FUIMapDetailButtonTableViewCell
cell.button.titleLabel?.numberOfLines = 0
cell.buttonHeadlineText = "Directions"
cell.buttonSubheadlineText = "22 minute drive"
cell.button.backgroundColor = UIColor.preferredFioriColor(forStyle: .tintColor)
cell.descriptionLabel.text = "ABC Drive, Cupertino, CA"
return cell

theming

fdlFUIMapDetailButtonTableViewCell_button {
font-name: semiboldSystem;
font-size: 13;
font-color: @primary1;
background-color-normal: @tintColorDark;
background-color-highlighted: @tintColorTapStateDark;
}

fdlFUIMapDetailButtonTableViewCell_descriptionLabel {
font-style: footnote;
font-color: @primary1;
}
  • An FUIButton with access to custom headline text and subheadline text.

    Declaration

    Swift

    @objc
    public let button: FUIButton
  • A String to describe the main function of the button.

    Declaration

    Swift

    public var buttonHeadlineText: String? { get set }
  • A String to add additional details to the buttonHeadlineText

    Declaration

    Swift

    public var buttonSubheadlineText: String? { get set }
  • An FUILabel used as a description beneath the button. The label can wrap up to 2 lines.

    Declaration

    Swift

    @objc
    public let descriptionLabel: FUILabel
  • Reuse identifier @return String a reuse identifier that describes FUIMapDetailButtonTableViewCell

    Declaration

    Swift

    open class var reuseIdentifier: String { get }