ButtonTableViewCell
@MainActor
open class ButtonTableViewCell : UITableViewCell
The FUIMapDetailButtonTableViewCell is a UITableViewCell consisting of a FUIButton and a FUILabel within a vertical UIStackView.
Available:
button: AnFUIButtonwith access to custom headline text and subheadline text.buttonHeadlineText: AStringto describe the main function of the buttonbuttonSubheadlineText: AStringto add additional details to thebuttonHeadlineTextdescriptionLabel: AnFUILabelused as a description beneath thebutton. 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;
}
-
A
Stringto describe the main function of the button.Declaration
Swift
@MainActor public var buttonHeadlineText: String? { get set } -
A
Stringto add additional details to thebuttonHeadlineTextDeclaration
Swift
@MainActor public var buttonSubheadlineText: String? { get set } -
Reuse identifier @return String a reuse identifier that describes FUIMapDetailButtonTableViewCell
Declaration
Swift
@MainActor open class var reuseIdentifier: String { get }