when I’m trying to call a method on an object of type id, i get a warning raised (method not found). Of course not, but isn’t that the sense of an id object?
Is there a way to tell the compiler:
“You don’t now the class of the object on which i am calling this method, but don’t worry, i’m sure it does implement it!” ?
You could use
performSelector?And if you’ve got an object type
idit’s probably a good idea to userespondsToSelectoras well 🙂i.e.