What’s the difference between [NSNull null] and nil?

Directly from Apple:

The NSNull class defines a singleton object you use to represent null values in situations where nil is prohibited as a value (typically in a collection object such as an array or a dictionary).

So in your example, that’s exactly what’s happening, the programmer is choosing to put a null object into the controllers array, where nil is not allowed as a value.

Leave a Comment