The difference between using module and not using module in iOS project

  ios, question

LLVM provides a modular file import scheme, so we know that Mapkit files can be imported in either of the following two ways:

@import MapKit.MKAnnotation;
 #import <MapKit/MKAnnotation.h>

Then the question arises: What is the difference between the two imports?

The first is module import, and the second is traditional header file import. Do you want to know any direct difference between using some type in general development?

I tried both methods are feasible, but Xcode opens modules by default, and header files are still used by default#import <UIKit/UIKit.h>I want to know why. Thank you

Yes, I didCatgod’s BlogSuddenly understand a little, answer it yourself.

The module is used when using@importJust. If all the codes need to be rewritten in this way, it must be a huge project, so Apple has already done this part of work well in advance. As long as you use iOS7’s SDK, open the Enable modules and keep the original #import writing style. The compiler will automatically replace the possible places with the Modules writing style when compiling.