If I have an object of this class, then how do I know if the object is null (i.e., all NSString properties are null).
An object is not equal to zero, because all its properties are equal to zero. However, if you want to know if both properties of the string of your object are equal to zero, this will do the trick:
-(BOOL) bothStringsAreNil
{
return [self string1] == nil && [self string2] == nil;
}
. , , ..
-(BOOL) bothStringsAreNil
{
return ![self string1] && ![self string2];
}
.