This code:
#import <UIKit/UIKit.h> #import <MapKit/MapKit.h> #import <MessageUI/MessageUI.h> #import "MessageComposerViewController.h" #import <MessageUI/MFMailComposeViewController.h> @interface MapViewController : UIViewController <MFMailComposeViewControllerDelegate> // Add the delegate - (IBAction)showEmail:(id)sender; { IBOutlet MKMapView *mapView; } @property (nonatomic, retain) MKMapView *mapView; @end
This problem or error:
Cannot find protocol declaration for 'MFMailComposeViewControllerDelegate'; Did you mean "UIPageViewControllerDelegate"? for this character: #import "MessageComposerViewController.h"
The expected identifier or '(' for this character: @interface MapViewController: UIViewController // Add a delegate and this character: {
Thanks for the promotion. :)
Try it,
#import <UIKit/UIKit.h> #import <MapKit/MapKit.h> #import <MessageUI/MessageUI.h> #import "MessageComposerViewController.h" #import <MessageUI/MFMailComposeViewController.h> @interface MapViewController : UIViewController <MFMailComposeViewControllerDelegate,UINavigationControllerDelegate> { IBOutlet MKMapView *mapView; } - (IBAction)showEmail:(id)sender; @property (nonatomic, retain) MKMapView *mapView; @end
Xcode, . , .
, ios8. , , - , . , libAWDProtobufFacetimeiMessage - . , , , , . . , , .