Created
April 24, 2012 14:32
-
-
Save mikeabdullah/2480126 to your computer and use it in GitHub Desktop.
Calling equality testing methods on nil
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
NSString *string = nil; | |
BOOL result = [string isEqualToString:@""]; | |
NSNumber *number = nil; | |
BOOL result = [number isEqualToNumber:[NSNumber numberWithInt:0]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment