这个应用程序在测试时运行的很好,但是在delegate:self旁边我得到了.
将'ViewController *const __strong‘发送到不兼容类型'id< UIActionSheetDelegate>’的参数
在这方面的任何帮助都是非常感谢的,因为我已经在这上面几天了!
我的视图控制器.
#import <UIKit/UIKit.h>
#import <Social/Social.h>
#import "Accounts/Accounts.h"
#import <MessageUI/MessageUI.h>
@interface ViewController : UIViewController<MFMailComposeViewControllerDelegate>
{
UIAlertView *objresponseAlert;
}
@property (weak, nonatomic) IBOutlet UITextView *myTextView;
- (IBAction)emailButton:(id)sender;
@end在我看来。我有.
- (IBAction)emailButton:(id)sender {
UIActionSheet *actionsheet = [[UIActionSheet alloc]
initWithTitle:@"Title"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Email", nil];
[actionsheet showInView:self.view];
}发布于 2013-10-04 14:41:05
这是完美的!
// Make Class conform to UIActionSheet delegate
@interface ViewController : UIViewController<MFMailComposeViewControllerDelegate,UIActionSheetDelegate>https://stackoverflow.com/questions/15705723
复制相似问题