SwitchCell
open class SwitchCell : UITableViewCell, Configurable
A UITableViewCell subclass that shows a UISwitch as the accessoryView.
-
A
UISwitchas theaccessoryView. Not available on tvOS.Declaration
Swift
@available(tvOS, unavailable, message: "switchControl is not available on tvOS.") public private(set) lazy var switchControl: UISwitch { get set } -
The switch cell’s delegate object, which should conform to
SwitchCellDelegate. Not available on tvOS.Declaration
Swift
@available(tvOS, unavailable, message: "SwitchCellDelegate is not available on tvOS.") open weak var delegate: SwitchCellDelegate?
-
Overrides
UITableViewCell‘s designated initializer.Declaration
Swift
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)Parameters
styleA constant indicating a cell style.
reuseIdentifierA string used to identify the cell object if it is to be reused for drawing multiple rows of a table view.
Return Value
An initialized
SwitchCellobject. -
Overrides the designated initializer that returns an object initialized from data in a given unarchiver.
Declaration
Swift
public required init?(coder aDecoder: NSCoder)Parameters
aDecoderAn unarchiver object.
Return Value
self, initialized using the data in decoder.
-
Set up the switch control (iOS) or accessory type (tvOS) with the provided row.
View on GitHub
SwitchCell Class Reference