SwitchCell
open class SwitchCell : UITableViewCell, Configurable
A UITableViewCell
subclass that shows a UISwitch
as the accessoryView
.
-
A
UISwitch
as 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
style
A constant indicating a cell style.
reuseIdentifier
A 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
SwitchCell
object. -
Overrides the designated initializer that returns an object initialized from data in a given unarchiver.
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
Parameters
aDecoder
An 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.