ATCheckbox
public class ATCheckbox: UIControl
The ATCheckbox creates a check-box control.
-
Initializer.
Declaration
Swift
required public init(coder pDecoder: NSCoder)
-
Initializer.
Declaration
Swift
override public init(frame:CGRect)
-
Overridden method from superclass.
Declaration
Swift
override public func awakeFromNib()
-
Overridden method from superclass.
Declaration
Swift
public override func layoutSubviews()
-
Overridden method from superclass.
Declaration
Swift
public override func draw(_ pRect: CGRect)
-
The variable allows to get the state of the checkbox as checked or not-checked.
Usage Example
if self.checkBox.isChecked { Swift.print("Checked") } else { Swift.print("Not Checked") }
See also
func set(isChecked :Bool, animated :Bool)
Declaration
Swift
@IBInspectable public var isChecked :Bool
-
The method allows to set the state of the checkbox as checked or not-checked.
Usage Example
self.checkBox.set(isChecked: true, animated: true)
See also
var isChecked :Bool
Declaration
Swift
public func set(isChecked pIsChecked :Bool, animated pAnimated :Bool)
-
The variable allows to set checked state image of the checkbox. This image will override default look.
Usage Example
self.checkBox.checkedControlStateImage = UIImage(named: "CheckboxChecked")
See also
var uncheckedControlStateImage :UIImage?
Declaration
Swift
@IBInspectable public var checkedControlStateImage :UIImage?
-
The variable allows to set unchecked state image of the checkbox. This image will override default look.
Usage Example
self.checkBox.uncheckedControlStateImage = UIImage(named: "CheckboxUnchecked")
See also
var checkedControlStateImage :UIImage?
Declaration
Swift
@IBInspectable public var uncheckedControlStateImage :UIImage?
-
Overridden method from superclass.
Declaration
Swift
public override func touchesEnded(_ pTouches: Set<UITouch>, with pEvent: UIEvent?)