1
MessageUI 프레임 워크를 사용하여 앱의 이메일을 작성하고 있습니다. 메일 본문에 HTML 컨텐츠를 설정해야합니다. MFMailComposeViewController 뷰의 메일 본문에 HTML 콘텐츠를 설정하십시오.
그래서 나는 Mugunthkumar's blog을 대해 참조 나는, 나는 다음과 같은 메일 본문을 얻고보기를 구성하는 이메일로 이동 응용 프로그램을 실행하고 언제,MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"Hello from California!"];
// Set up recipients
NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"];
NSArray *ccRecipients = [NSArray arrayWithObjects:@"[email protected]", @"[email protected]", nil];
NSArray *bccRecipients = [NSArray arrayWithObject:@"[email protected]"];
[picker setToRecipients:toRecipients];
[picker setCcRecipients:ccRecipients];
[picker setBccRecipients:bccRecipients];
// Fill out the email body text
NSString *pageLink = @"http://mugunthkumar.com/mygreatapp"; // replace it with yours
NSString *iTunesLink = @"http://link-to-mygreatapp"; // replate it with yours
NSString *emailBody =
[NSString stringWithFormat:@"%@\n\n<h3>Sent from <a href = '%@'>MyGreatApp</a> on iPhone. <a href = '%@'>Download</a> yours from AppStore now!</h3>", @"title", pageLink, iTunesLink];
[picker setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:picker animated:YES];
[picker release];
다음과 같이 코딩
XCode4 및 iOS 4.3을 사용하고 있습니다. 내 코드에 문제가 없습니다. 하지만 메일 본문에 클릭 가능한 URL을 삽입해야합니다.
도와주세요!
고마워요. 이제 몸의 내용이 내가 원하는대로 보여줍니다. – chinthakad