I am going to send a mail from my application and I have added the MessageUI framework. In the sample code from Apple they write this:
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>
What is the difference between those, and whats the “slash” doing there?
The slash basically is saying the the .h file is in the framework of the framework named before the slash.
The difference between the two is that by using
/MessageUI.h>you are doing the same as importing every single class in the framework. When you use/MFMailComposeViewController.h>you are only implementing one class in the framework. Therefore no other classes will be available apart from the class imported.