0

MFMailComposeViewController からステータスを取得する方法はありますか? 20枚の画像を含むメールを送信しているとしましょう。読み込みを表示し、送信が完了したら読み込みを非表示にしたいとします。

4

2 に答える 2

1

いいえ。ユーザーがメールの送信を選択し、デリゲート メソッドがアプリで呼び出されると、メールは送信トレイに置かれ、バックグラウンド メール デーモンによって送信されるのを待ちます。このような電子メールのステータスを取得する API はありません。何らかの理由でメールが送信できない場合でも、アプリがこの情報を取得する方法はありません。

于 2013-02-12T21:02:24.547 に答える
-1
try the delegate methods may be it help you.


#pragma mark - MailComposeController

- (void)mailComposeController:(MFMailComposeViewController*)controller  didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
    switch (result)
    {
        case MFMailComposeResultCancelled:
            NSLog(@"Mail cancelled: you cancelled the operation and no email message was queued.");
            break;
        case MFMailComposeResultSaved:
            NSLog(@"Mail saved: you saved the email message in the drafts folder.");
            break;
        case MFMailComposeResultSent:
            NSLog(@"Mail send: the email message is queued in the outbox. It is ready to send.");
            break;
        case MFMailComposeResultFailed:
            NSLog(@"Mail failed: the email message was not saved or queued, possibly due to an error.");
            break;
        default:
            NSLog(@"Mail not sent.");
            break;
    }

}
于 2013-02-12T21:08:07.300 に答える