What are the differences between #import and #include in Objective-C and are there times where you should use one over the other? Is one deprecated?
I was reading th
#include
works just like the C #include
.
#import
keeps track of which headers have already been included and is ignored if a header is imported more than once in a compilation unit. This makes it unnecessary to use header guards.
The bottom line is just use #import
in Objective-C and don't worry if your headers wind up importing something more than once.