I iterate through NSArray, which contains many different types of objects. There are many ways to find out which class is an object. However, I could not find a good way to find out if an object can implement a specific function. I can put it in a try-catch, but it still gives an error message in the console, even if I catch the error. Is there a better way to do this?
A simple example:
@try { if ([element lowercaseString]) { //do something } } @catch (id theException) { // do something else }
methods objective-c cocoa
Jason
source share