I'd like to check for an empty object (i.e. an object of an array which doesn't have a value) within an array which gets its data from a file.
As an example, if my array contains 12 objects (all NSString) and the object at index 11 doesn't return a value when its description is printed into the debug section of Xcode. I want to check if that is the case and respond accordingly. I already tried
if (!([MY_ARRAY objectAtIndex:11] == nil))
{
//Some Stuff
}
else
{
//Some other Stuff
}
which didn't work.
Any help is appreciated.
NSString(which return themselves as their description) then it may just be the empty string.descriptionand therefore output byNSLogis a description of the object. It is not the Objective-C syntax you would need to type to create the object. Can you imagine what something likeNSURLConnectionwould have to supply as a description?