iOSで電子メールプロンプトを表示すると、奇妙なアサーションエラーが発生する
コード:
-(void)displayComposerSheet:(id)delegate withDataSource:(id)datasource {
MFMailComposeViewController * picker = [[MFMailComposeViewController alloc] init];
picker.navigationBar.tintColor = self.navigationController.navigationBar.tintColor;
picker.mailComposeDelegate=デリゲート;
//データソースを使用してメールフィールドに入力します
if([[データソース受信者]カウント]> 0)
[ピッカーsetToRecipients:[データソース受信者]];
[ピッカーsetSubject:[データソースサブジェクト]];
[picker setMessageBody:[datasource emailText] isHTML:[datasource isHTML]];
[[UIWindow topMostController] presentModalViewController:pickerアニメーション:YES];
[ピッカーbecomeFirstResponder];
[ピッカーリリース];
}
MyApp [60324:907] ***-[MFMailComposeInternalViewController _endDelayingCompositionPresentation]、/ SourceCache / MessageUI / MessageUI-1075.10 / Mail / MFMailComposeInternalViewController.m:316でアサーションが失敗しました