私は電子メールを送信するように選択した電子メールを取得しようとしています。 しかし、私はどのようにMFMailComposeViewControllerビューで選択したユーザーがsetToRecipientsを知っていません。MFMailComposeViewControllerでToToRecipientsを設定する方法
if ([MFMailComposeViewController canSendMail])
{
mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:@"A Message from blablabl"];
NSMutableArray *usersTo = [[NSMutableArray alloc] init];
toRecipients = usersTo;
[mailer setToRecipients:toRecipients];
NSString *emailBody = @"blablablabal";
[mailer setMessageBody:emailBody isHTML:YES];
// only for iPad
// mailer.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentModalViewController:mailer animated:YES];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failure"
message:@"Your device doesn't support the composer sheet"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles: nil];
[alert show];
}
それdoesntの仕事.... "[email protected]&1以上います\ u2026" 彼は&n個入れた後ので、 だけ私は、ユーザー... を1通の電子メールを取得することができますuitextfieldのサイズを変更しようとしています – user1177647
@Michael Dautermann IOSシミュレータの設定からMail Appが見つからないので、IOSシミュレータを使ってXcodeでアプリをテストするときに電子メールを送信する方法はありません。私はMacにIphoneデバイスを接続し、このデバイス上のXcodeからアプリケーションを実行すると、Macで私のiPhoneの画面を表示する方法があるので、物理デバイス上で実行されているアプリケーションを制御できます。マウスをクリックして、iPhoneに表示された画面から電子メールを送信します。どうもありがとう – bibscy