An NSArray
(and any instance of its subclasses, such as NSMutableArray
) can hold any kind of object. A view controller is an object, so an NSArray
instance can hold it.
Notice that the array holds strong references to the objects it contains, so if your object is added to an array it will stay in memory even if all other references are removed (for instance by setting them to nil
). Until you remove the object from the array, of course.
All of these considerations are valid for sets and dictionaries, too, btw.