I need to check if some object has text property. For example it can be an UIButton or an UILabel. But there is an issue between properties that display text for an UIButton and for an UILabel.
This is the difference:
For an UIButton we set text using setTitle: method, but for an UILabel we using another one named setText:
What I need to do with this:
I need to get all subviews and if these subviews have text property I need to change this property value with some text.
So of course I can check class of object and setup needed property, but maybe we have another approach to do it without checking class of object.