How to handle CheckBox event in Swift
A very simple checkbox control. @IBAction func btn_box(sender: UIButton ) { if ( btn_box . selected == true ) {...
https://www.czetsuyatech.com/2014/10/xcode-checkbox-event.html
A very simple checkbox control.
@IBAction func btn_box(sender: UIButton) {
if (btn_box.selected == true)
{
btn_box.setBackgroundImage(UIImage(named: "box"), forState: UIControlState.Normal)
btn_box.selected = false;
}
else
{
btn_box.setBackgroundImage(UIImage(named: "checkBox"), forState: UIControlState.Normal)
btn_box.selected = true;
}
}
Post a Comment