What is the best way to achieve a radio button effect?
So far, I have used addTarget to detect the touch:
button.addTarget(self, action: #selector(buttonPressed(_:)), for: .touchUpInside)
func buttonPressed(_: AnyObject){
self.layer.backgroundColor = UIColor.green().cgColor
}This however, only works as a checkbox, not the radio button.
Any help is much appreciated!