FUIBaseTableViewCell
open class FUIBaseTableViewCell : UITableViewCell
A UITableViewCell
subclass, which supports limited configuration of separator line visibility and tintColor configuration.
Theming
Supported style classes
fdlFUIBaseTableViewCell
fdlFUIBaseTableViewCell_selectedBackgroundView
-
Indicates whether a tap action will result in a persistent cell selection background, or a momentary highlight.
Important
does not affect the behavior ofisSelected
Declaration
Swift
public var isMomentarySelection: Bool
-
Extension to
UITableViewCell
to supportUIControlState
-like configuration, withFUIStateSelectable
.Important
The default of this implementation does nothing.Declaration
Swift
public var isEnabled: Bool
-
The set of edges of the view, which should display a separator line. This property is designed to manage cell separators only at the beginning or end of a section. For all other separator lines, you should use
UITableView.separatorStyle
, orUITableView.separatorInset
, to configure visibility.Defaults to
.all
.Important
Only top and bottom edges support separator lines. Options.left
and.right
will be ignored.override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: FUIObjectTableViewCell.reuseIdentifier, for: indexPath as IndexPath) as! FUIObjectTableViewCell if indexPath.row == 0 { cell.separators = .bottom } if indexPath.row == tableView.numberOfRows(inSection: indexPath.section) - 1 { cell.separators = .top } // or if tableView.numberOfRows(inSection: indexPath.section) == 1 { cell.separators = [] }
Declaration
Swift
@available(*, deprecated: 10.0, message: "The cell `separators` override API has been disabled, to ensure there are no violations of Apple AppStore policy. The Fiori Design Guidelines for cell separators have been updated. Please use `.line` preferred Fiori color for cell separator line, and `.backgroundBase` for table view background.") public var separators: UIRectEdge
-
Override this method to update appearance of the component according to state change. Default implementation does nothing. You can call tintColor(forState:) to get the tintColor for a state.
Declaration
Swift
open func applyTintColor(forState state: UIControlState)
Parameters
state
state
for which apply tintColor.
-
Public setter to set tint color for state.
Declaration
Swift
public func setTintColor(_ color: UIColor, for state: UIControlState)
Parameters
color
color
needed for a state.state
state
for whichtintColor
is needed -
Should be invoked by controls, when state is changed. Technique for doing this may vary. Controls are responsible for invoking correclty.
Declaration
Swift
public func stateDidChange()
-
Public getter to read tint color from backing dictionary
Declaration
Swift
public func tintColor(for state: UIControlState) -> UIColor?
Parameters
state
state
for whichtintColor
is neededReturn Value
if not
.normal
state, reads from backing dictionary. If.normal
, returnsself.tintColor
. (This solves the issue, where an unsettintColor
should return color fromsuper
.