For the More Curious: #import and @import

When Objective-C was new, the system did not ship with many classes. Eventually, however, there were enough classes that it become necessary to organize them into frameworks. In your source code, you would typically #import the master header file for a framework:

#​i​m​p​o​r​t​ ​<​F​o​u​n​d​a​t​i​o​n​/​F​o​u​n​d​a​t​i​o​n​.​h​>​

And that file would #import all the headers in that framework, like this:

#​i​m​p​o​r​t​ ​<​F​o​u​n​d​a​t​i​o​n​/​N​S​A​r​r​a​y​.​h​>​ #​i​m​p​o​r​t​ ​<​F​o​u​n​d​a​t​i​o​n​/​N​S​A​u​t​o​r​e​l​e​a​s​e​P​o​o​l​.​h​>​ #​i​m​p​o​r​t​ ​<​F​o​u​n​d​a​t​i​o​n​/​N​S​B​u​n​d​l​e​.​h​>​ #​i​m​p​o​r​t​ ​<​F​o​u​n​d​a​t​i​o​n​/​N​S​B​y​t​e​O​r​d​e​r​.​h​>​ #​i​m​p​o​r​t​ ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.