FUIBaseTableViewCell
@MainActor
open class FUIBaseTableViewCell : UITableViewCell, FUIViewBorderDrawing
extension FUIBaseTableViewCell: FUIStateSelectable, FUIStateTintable
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 ofisSelectedDeclaration
Swift
@MainActor public var isMomentarySelection: Bool -
Extension to
UITableViewCellto supportUIControlState-like configuration, withFUIStateSelectable.Important
The default of this implementation does nothing.Declaration
Swift
@MainActor public var isEnabled: Bool -
Workaround for the compile issue where empty initializer is not accessible in xcframework.
Declaration
Swift
@MainActor required public init() -
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.leftand.rightwill 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, 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.") @MainActor 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
@MainActor open func applyTintColor(forState state: UIControlState)Parameters
statestatefor which apply tintColor.
-
Public setter to set tint color for state.
Declaration
Swift
@available(*, deprecated, message: "No longer supported. Set textColor and tintColor programmatically.") @MainActor public func setTintColor(_ color: UIColor, for state: UIControlState)Parameters
colorcolorneeded for a state.statestatefor whichtintColoris needed -
Should be invoked by controls, when state is changed. Technique for doing this may vary. Controls are responsible for invoking correclty.
Declaration
Swift
@MainActor public func stateDidChange() -
Public getter to read tint color from backing dictionary
Declaration
Swift
@MainActor public func tintColor(for state: UIControlState) -> UIColor?Parameters
statestatefor whichtintColoris neededReturn Value
if not
.normalstate, reads from backing dictionary. If.normal, returnsself.tintColor. (This solves the issue, where an unsettintColorshould return color fromsuper.
-
The set of edges of the view, which should display a separator line.
Defaults to
.none.Important
Only top and bottom edges support separator lines. Options.leftand.rightwill be ignored.view.borders = .topDeclaration
Swift
@MainActor open var borders: UIRectEdge { get set }