How To Produce Checkbox Outcome Inward Swift

A really uncomplicated 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;
        }
    }


Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.