Created
December 19, 2012 12:36
-
-
Save krzysztofzablocki/4336389 to your computer and use it in GitHub Desktop.
Simplified check as nil is fine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SafeCall(arg, methodToCall) (arg !=[NSNull null]) ? [arg methodToCall] : nil | |
int optionalValue = SafeCall([response valueForKey:@"number"], intValue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment