In objective C, what is a better way of doing this:
if ([response class] == [nil class])
response is either a NSDictionary or NSMutableDictionary
The code is working but I’m getting a "Invalid receiver type 'void *' or "comparison of distinct Objective-C types 'Class' and 'struct NSMutableDictionary *' lacks a cast" warning messages
Thanks
If you’re actually looking to test
[response class], instead of the value ofresponseitself, you’ll want to useIf you’re looking to check if
responseitself isnil, I describe a nice way of doing this in this answer to a similar question.