But [NSNull null] can solve this problem in case you really want to have a "Null Object"
if(anObject!=nil){[self setObject:anObject forKey:aKey];return YES;}else{[self setObject:[NSNull null] forKey:aKey];return NO;}
reference: https://gist.github.com/307568
沒有留言:
發佈留言