Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 正在尝试将邮件集成到我的应用程序中,收到2条警告_Objective C_Email_Integration_Cocos2d Iphone_Mfmailcomposeviewcontroller - Fatal编程技术网

Objective c 正在尝试将邮件集成到我的应用程序中,收到2条警告

Objective c 正在尝试将邮件集成到我的应用程序中,收到2条警告,objective-c,email,integration,cocos2d-iphone,mfmailcomposeviewcontroller,Objective C,Email,Integration,Cocos2d Iphone,Mfmailcomposeviewcontroller,我正试图将发送邮件集成到我的应用程序中,但最终出现了两个警告。我正在使用Obj-C,Cocos2d框架。这是我的密码 -(void) mailTapped: (id) sender { MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; composer.mailComposeDelegate = self; if ([MFMailComposeViewControl

我正试图将发送邮件集成到我的应用程序中,但最终出现了两个警告。我正在使用Obj-C,Cocos2d框架。这是我的密码

    -(void) mailTapped: (id) sender {
 MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
 composer.mailComposeDelegate = self;
 if ([MFMailComposeViewController canSendMail]) {
  [composer setToRecipients:[NSArray arrayWithObjects:@"", nil]];
  [composer setSubject:@"Check Out This Awesome App!"];
  [composer setMessageBody:@"I found this great game on the App Store! It's called Mole Attack. It's a side scroller with an epic story. You can check out some screenshots of the gameplay and download it here. Download link - " isHTML:NO]; //Include link and pics
  [self presentModalViewController:composer animated:YES];  // <--- warning - GameOver (name of class) may not respond to '-presentModalViewController:animated:'
 }
} 

-(void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {
 [self dismissModalViewControllerAnimated:YES]; // <--- warning - GameOver may not respond to '-dismissModalViewControllerAnimated:YES'
 if (result == MFMailComposeResultFailed) {
  UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failed" message:@"The email was not sent. You must be in wifi or 3G range. Try again later." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
  [alert show];
  [alert release];
 }
}
-(void)mailtrapped:(id)发件人{
MFMailComposeViewController*编写器=[[MFMailComposeViewController alloc]init];
composer.mailComposeDelegate=self;
如果([MFMailComposeViewController canSendMail]){
[composer setToRecipients:[NSArray arrayWithObjects:@',无]];
[composer setSubject:@“查看这个很棒的应用程序!”;
[composer setMessageBody:@“我在应用商店找到了这个很棒的游戏!它叫鼹鼠攻击。这是一个带有史诗故事的侧面滚动条。你可以查看一些游戏的屏幕截图,然后在这里下载。下载链接-“isHTML:否];//包括链接和图片

[自我呈现模式控制器:作曲家动画:是];//你确定你的
GameOver
类继承自
UIViewController
?这个类定义了你收到警告的两个方法。

啊,这就是问题所在!只是我不确定如何使它成为UIVewController,因为我需要将它保留在CCLayer,因为我使用的是Cocos2d。