2012-05-05 21 views
0

我的應用程序,用戶與我公司聯繫的Xcode mfmailcomposeviewcontroller鎖setToRecipients

的問題是,用戶可以把任何電子郵件地址,但我想鎖定或做一些事來setToRecipients,使用戶無法進行任何改變這個領域。

這裏是我的代碼

MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; 
[composer setMailComposeDelegate:self]; 
if ([MFMailComposeViewController canSendMail]) { 
    [composer setToRecipients:[NSArray arrayWithObjects:@"[email protected]", nil]]; 
    [composer setSubject:@"subject here"]; 
    [composer setMessageBody:@"message here" isHTML:NO]; 
    [composer setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; 
    [self presentModalViewController:composer animated:YES]; 
    [composer release]; 
} 

任何幫助或指導!

感謝名單&問候

回答

0

不能作爲MFMailComposeViewController不提供該功能。

0

從外觀看,你不能。原因是蘋果有安全保護,以確保您的應用程序不會自動發送垃圾郵件,從他們的角度來看,用戶應該始終具有靈活性來選擇電子郵件地址。