2

テスト時にはアプリは完全に正常に動作しますが、次delegate:selfは...

'ViewController *const __strong' を互換性のない型 'id< UIActionSheetDelegate>' のパラメーターに送信しています

何日もこれに携わってきたので、これに関する助けは大歓迎です!

私のViewcontroller.hは...

#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

そして、私のViewController.mには....

- (IBAction)emailButton:(id)sender {    
    UIActionSheet *actionsheet = [[UIActionSheet alloc]
                                  initWithTitle:@"Title"
                                  delegate:self
                                  cancelButtonTitle:@"Cancel"
                                  destructiveButtonTitle:nil
                                  otherButtonTitles:@"Email", nil];
    [actionsheet showInView:self.view];
}
4

1 に答える 1

5

これは完璧に機能します!

// Make Class conform to UIActionSheet delegate
@interface ViewController : UIViewController<MFMailComposeViewControllerDelegate,UIActionSheetDelegate>
于 2013-10-04T14:41:05.043 に答える