no

How to handle CheckBox event in Swift

A very simple checkbox control.   @IBAction func btn_box(sender: UIButton ) {         if ( btn_box . selected == true )         {...

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;
        }
    }


Related

xcode 9089530632614724178

Post a Comment Default Comments

item