I want to ask what is the meaning of line 3
"MapKitSampleViewController"? Can we change it to #import
"MapKitSampleViewController.h"?
Yes.
@class keyword is a "forward declaration". What you are telling the compiler is that this class is going to be used in this class, but the header import for it will be elsewhere.
Most likely if you look in the .m file, you will find that the #import "MapKitSampleViewController.h" will be there.
Why?
The reason why this was implemented (I think, anyway), is to prevent circular imports. Imagine a scenario where the following happens:
Class1.h
#import Class2.h
Class2.h
#import Class1.h
Now, if I'm not wrong, what happens here is that during compilation, it will repeatedly import both header and bad things happen. The @class keyword is meant to prevent this from happening, because the import for those files will happen in the .m files, not in the .h files.
BTW this is a duplicate of @class vs. #import
So you will likely find more in-depth discourse on this topic at that question.