You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trying to change state like off and on (toggling). When i set button.on = false, i put log it's return true i don't know how to fix. kindly do need fully , herewith add some codes and screen shot of storyboard .
Hi,
I trying to change state like off and on (toggling). When i set button.on = false, i put log it's return true i don't know how to fix. kindly do need fully , herewith add some codes and screen shot of storyboard .
btn_terms.on = false btn_terms.boxType = .circle btn_terms.onAnimationType = .oneStroke btn_terms.offAnimationType = .fill btn_terms.tintColor = UIColor.lightGray btn_terms.onTintColor = UIColor(hexString: appColor.BGColor) btn_terms.onFillColor = UIColor.clear btn_terms.onCheckColor = UIColor(hexString: appColor.BGColor) btn_terms.animationDuration = 0.5 btn_terms.delegate = self
@IBAction func action_terms(_ sender: BEMCheckBox) { print(sender.on) if sender.on{ sender.setOn(false, animated: true) }else{ sender.setOn(true, animated: true) } }
i tried with delegate also but i'm starting state is on= false when i log its return as true
extension RegisterVC: BEMCheckBoxDelegate { func didTap(_ checkBox: BEMCheckBox) { if checkBox.on{ checkBox.setOn(false, animated: true) }else{ checkBox.setOn(true, animated: true) } } }
The text was updated successfully, but these errors were encountered: