首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xcode4.3 UIActionSheet导致错误消息

Xcode4.3 UIActionSheet导致错误消息
EN

Stack Overflow用户
提问于 2013-03-29 14:54:29
回答 1查看 1.5K关注 0票数 2

这个应用程序在测试时运行的很好,但是在delegate:self旁边我得到了.

将'ViewController *const __strong‘发送到不兼容类型'id< UIActionSheetDelegate>’的参数

在这方面的任何帮助都是非常感谢的,因为我已经在这上面几天了!

我的视图控制器.

代码语言:javascript
复制
#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

在我看来。我有.

代码语言:javascript
复制
- (IBAction)emailButton:(id)sender {    
    UIActionSheet *actionsheet = [[UIActionSheet alloc]
                                  initWithTitle:@"Title"
                                  delegate:self
                                  cancelButtonTitle:@"Cancel"
                                  destructiveButtonTitle:nil
                                  otherButtonTitles:@"Email", nil];
    [actionsheet showInView:self.view];
}
EN

回答 1

Stack Overflow用户

发布于 2013-10-04 14:41:05

这是完美的!

代码语言:javascript
复制
// Make Class conform to UIActionSheet delegate
@interface ViewController : UIViewController<MFMailComposeViewControllerDelegate,UIActionSheetDelegate>
票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15705723

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档