-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't able to change State #69
Labels
Comments
Hi @syedrazackimran, Thank you for opening this issue!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: