EnterpriseDS Documentation

Class DSCheckbox​Table​View​Cell

@IBDesignable
public final class DSCheckboxTableViewCell: UITableViewCell  

A UITableViewCell that implements a DSCheckbox for easy usage.

When added to a UITableView, this class lays out a DSCheckbox while passing through the properties directly to it. It honors margins and exposes the underlying DSCheckbox for further customization and data access.

For storyboards, add a UITableViewCell to your view and change the class name to DSCheckboxTableViewCell.

Set a DSCheckboxDelegate to the component to get notified about value changes.

DSCheckboxTableViewCell DSCheckboxTableViewCell UITableViewCell UITableViewCell DSCheckboxTableViewCell->UITableViewCell

Conforms To

UITableViewCell

Initializers

init?(coder:​)

public required init?(coder: NSCoder)  

init(style:​reuse​Identifier:​)

public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)  

Properties

checkbox​Delegate

@IBOutlet public weak var checkboxDelegate: DSCheckboxDelegate?  

The delegate which receives updates on the DSCheckbox's state.

is​Checked

@IBInspectable public var isChecked: Bool = false  

When true, the checkbox is checked. Unchecked otherwise.

title

@IBInspectable public var title: String = ""  

The text to be displayed next to the checkbox.

group​Name

@IBInspectable public var groupName: String? = nil  

A shared group name that is read by Voiceover to signify if this is part of a group of checkboxes. They won't be linked in any way. It should be readable and not an identifier. (e.g. "Notifications to Receive")

is​Enabled

@IBInspectable public var isEnabled: Bool = true  

Returns true if the checkbox is enabled and allows checking/unchecking.

accessibility​Traits

public override var accessibilityTraits: UIAccessibilityTraits  

accessibility​Label

public override var accessibilityLabel: String?  

accessibility​Hint

public override var accessibilityHint: String?  

accessibility​Value

public override var accessibilityValue: String?  

checkbox

public private(set) var checkbox: DSCheckbox! 

Methods

layout​Subviews()

public override func layoutSubviews()