I’m learning Objective-C and I have a question about NSArray. Can it contain nil? I read somewhere an NSArray cannot contain nil. Is this the same for NSMutableArray?
I’m learning Objective-C and I have a question about NSArray. Can it contain nil?
Share
Neither can contain nil. They’ll raise an exception if you try to put it in. If you want to represent the idea of “nothing” in an array, set or dictionary, you can use NSNull.