Is it possible to initialize NSString object with null value?
Something like:
NSString *strNullTest = [[NSString alloc]initWithString:[NSNull null]];
When I am doing this it’s giving warning:
instance method -“null” not found return type default to id.
Does anyone knows the right way to initialize a string object with null?
there is no “null string” exist in objc. why you want a null string?
either you can use an empty string
@""or just usenilif you want to put the string in a array or dictionary,
[NSNull null]is good. all you need to do is to compare the value with[NSNull null]fist byobject == [NSNull null]