0

在我的应用程序中,我使用 MFMailComposer 发送电子邮件。

在我的应用程序中,用户可以选择他想要发送和发送电子邮件的时间。

它工作正常。但我所做的是,我使用 NSTimer 打开 MFMailComposeViewController 并以编程方式单击发送按钮。

但我不确定苹果可能会批准我的应用程序还是拒绝。有没有人在应用程序中使用过这种类型的功能,而苹果已经批准或拒绝了应用程序。请告知。

请帮帮我。

以下是我的代码:

-(void)showController {
    MFMailComposeViewController *mailController;
    //alloc, init, set properties, do whatever you normally would
    [self.navigationController presentModalViewController:mailController animated:YES];
    [mailController release];

    [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(sendMail:) userInfo:mailController repeats:NO];
}

-(void)sendMail:(NSTimer*)theTimer {
    MFMailComposeViewController *mailController = theTimer.userInfo;
    UIBarButtonItem *sendBtn = mailController.navigationBar.topItem.rightBarButtonItem;
    id targ = sendBtn.target;
    [targ performSelector:sendBtn.action withObject:sendBtn];
}
4

1 回答 1

0

您需要得到用户的确认。用户将点击发送按钮。您只能创建邮件并显示给用户确认。MFMailComposeViewController 的默认行为。

谢谢

于 2012-06-11T08:18:22.097 回答