Chapter 4. Storing data in collections


This chapter covers
  • NSArray
  • NSDictionary
  • Storing nil and other special values in collections
  • Boxing and unboxing non-object-based data


Chapter 3 introduced the concept of object-oriented programming and demonstrated some of its advantages by using the services of the prebuilt NSString class, which provides common text manipulation and query-related functionality.

A large part of Foundation Kit is concentrated on the storage of data in collection data structures with names such as arrays, dictionaries, sets, and hashmaps. These data structures allow you to efficiently collect, group, sort, and filter data in a way that’s convenient for the application at hand. Discussing these commonly used classes ...

Get Objective-C Fundamentals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.