NSArray of views


I noticed in the book (at least as far as Ch4 and Ch5), all the diagrams show views as being stored in an NSArray. Is this something that happens behind the scenes? In the code, there’s no NSArray being created to hold the views (as far as I can tell). Did I overlook something, or was the NSArray never mentioned?


I don’t have the book, but if the diagrams are referring to the subviews of a view the answer is yes. The array is created (and managed) by the view itself when a view is created.


Yes, it means every subview is managed by it’s parent inside an NSArray where is contained with all the other subviews. So don’t worry about you losing any NSArray creation.