gpt4 book ai didi

ios - 找不到 'MFMailComposeViewControllerDelegate' 的协议(protocol)声明;你是说 'UIPageViewControllerDelegate' 吗?

转载 作者:可可西里 更新时间:2023-11-01 05:35:41 24 4
gpt4 key购买 nike

这段代码:

#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

这个问题或错误:

  • 找不到“MFMailComposeViewControllerDelegate”的协议(protocol)声明;您是指“UIPageViewControllerDelegate”吗?对于这个 lign:#import "MessageComposerViewController.h"

  • 预期标识符或“(”对于这个 lign:@interface MapViewController:UIViewController//添加委托(delegate)还有这个灯:{

感谢提前。 :)

最佳答案

试试这个,

    #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

关于ios - 找不到 'MFMailComposeViewControllerDelegate' 的协议(protocol)声明;你是说 'UIPageViewControllerDelegate' 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20886809/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com