ButtonTableViewCell
open class ButtonTableViewCell : UITableViewCell
The FUIMapDetailButtonTableViewCell
is a UITableViewCell
consisting of a FUIButton
and a FUILabel
within a vertical UIStackView
.
Available:
button
: AnFUIButton
with access to custom headline text and subheadline text.buttonHeadlineText
: AString
to describe the main function of the buttonbuttonSubheadlineText
: AString
to add additional details to thebuttonHeadlineText
descriptionLabel
: AnFUILabel
used 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
String
to describe the main function of the button.Declaration
Swift
public var buttonHeadlineText: String? { get set }
-
A
String
to add additional details to thebuttonHeadlineText
Declaration
Swift
public var buttonSubheadlineText: String? { get set }
-
Reuse identifier @return String a reuse identifier that describes FUIMapDetailButtonTableViewCell
Declaration
Swift
open class var reuseIdentifier: String { get }