In Objective C, can you check if an object has a particular property or message?

Viewed 33621

I wat to do something like this:

if (viewController.mapView) [viewController.mapView someMethod];

However, if mapView is not a class variable, this crashes. How do I check if mapView exists?

4 Answers
Related