Class
DSRadioTableViewCell
@IBDesignable
public final class DSRadioTableViewCell: UITableViewCell
A UITableViewCell that implements a DSRadio for easy usage.
When added to a UITableView, this class lays out a DSRadio while passing through the properties directly to it. It honors margins and exposes the underlying DSRadio for further customization and data access.
For storyboards, add a UITableViewCell to your view and change the class name to DSRadioTableViewCell.
Set a DSRadioDelegate to the component to get notified about value changes.
Relationships
Conforms To
UITableViewCell
Initializers
init?(coder:)
public required init?(coder: NSCoder)
init(style:reuseIdentifier:)
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)
Properties
radioDelegate
@IBOutlet public weak var radioDelegate: DSRadioDelegate?
The delegate which receives updates on the DSRadio's state.
isChecked
@IBInspectable public var isChecked: Bool = false
When true, the radio is checked. Unchecked otherwise.
groupName
@IBInspectable public var groupName: String? = nil
A shared group name that links this radio to other radios in the UI and is read by Voiceover to signify if this is part of a group of checkboxes. It should be readable and not an identifier. (e.g. "Favorite Cats")
isEnabled
@IBInspectable public var isEnabled: Bool = true
Returns true if the radio is enabled and allows checking/unchecking.
accessibilityTraits
public override var accessibilityTraits: UIAccessibilityTraits
accessibilityLabel
public override var accessibilityLabel: String?
accessibilityHint
public override var accessibilityHint: String?
accessibilityValue
public override var accessibilityValue: String?
Methods
layoutSubviews()
public override func layoutSubviews()