I'm trying to identify the clicked radio button using the Interface builder identifier.
@IBAction func text_radio_changed(_ sender: Any) {
let button:NSButton = sender as! NSButton
let id:String = button.accessibilityIdentifier()
print("===========>"+id)
}
But the console keeps printing this
===========>
There is no identifier
button.accessibilityIdentifier
is the Accessibility Identity Identifier. The Identity Identifier is button.identifier
.
@IBAction func text_radio_changed(_ sender: Any) {
let button:NSButton = sender as! NSButton
let id:String = button.identifier!.rawValue
print("===========>"+id)
}