我以这种方式从MFMailComposeViewController
打开SKScene
:
-(void)sendmail {
if ([MFMailComposeViewController canSendMail]) {
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.delegate = self;
NSArray *recipients = [NSArray arrayWithObjects:@"nothing@gmail.com", nil];
[mailer setToRecipients:recipients];
UIViewController *vc = self.view.window.rootViewController;
[vc presentViewController:mailer animated:YES completion:nil];
}
}
这可行,但在我想要返回SKScene
之后,委托方法未被调用且无法返回。
这是SKScene的.h:
@interface SettingScene : SKScene <UINavigationControllerDelegate, MFMailComposeViewControllerDelegate>
出了什么问题?
感谢
答案 0 :(得分:1)
设置,
mailer.mailComposeDelegate = self;
在展示邮件时。
谢谢!