Hi,
I need to understand inside an override of UIBarButtonItem what is the systemItem of the button (done, add, trash, search, ...).
Unfortunately at the moment the only method I found is to inspect the content of self.description
(see below), but this solution, as well as being ugly, is very fragile because we can't be sure that the description will be the same also on future version of iOS / Swift.
Someone know a better way to check for systemItem inside an UIBarButtonItem override class?
Thank you
class BarButtonItem: UIBarButtonItem {
override func awakeFromNib() {
super.awakeFromNib()
print(self.description)
}
}
<MyApp.BarButtonItem: 0x7fadbcacbea0> systemItem=Trash