gpt4 book ai didi

ios - 将超链接添加到来自 iOS 应用程序的电子邮件中的预加载文本中

转载 作者:行者123 更新时间:2023-11-29 10:51:31 25 4
gpt4 key购买 nike

我有一个带有电子邮件共享按钮的 iOS 应用程序。在那,我想在应用程序商店中包含指向我们应用程序的链接。但是,我不想只包含 URL,而是想将它超链接到电子邮件正文中的某些文本。这可能吗?如果是这样,如何?谢谢!

最佳答案

请尝试以下代码

  - (void) sendEventInEmail
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;

[picker setSubject:@"Email Subject"];

// Fill out the email body text
NSString *iTunesLink = @"--------Link to iTune App link----";
NSString *content = [eventDictionary objectForKey:@"Description"];
NSString *imageURL = [eventDictionary objectForKey:@"Image URL"];
NSString *findOutMoreURL = [eventDictionary objectForKey:@"Link"];

NSString *emailBody = [NSString stringWithFormat:@"<br /> <a href = '%@'> <img src='%@' align=left style='margin:5px' /> </a> <b>%@</b> <br /><br />%@ <br /><br />Sent using <a href = '%@'>What's On Reading</a> for the iPhone.</p>", findOutMoreURL, imageURL, emailSubject, content, iTunesLink];

[picker setMessageBody:emailBody isHTML:YES];

[self presentModalViewController:picker animated:YES];

[picker release];
}

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
// Notifies users about errors associated with the interface
switch (result)
{
case MFMailComposeResultCancelled:
break;
case MFMailComposeResultSaved:
break;
case MFMailComposeResultSent:
break;
case MFMailComposeResultFailed:
break;
default:
break;
}
[self dismissModalViewControllerAnimated:YES];
}

关于ios - 将超链接添加到来自 iOS 应用程序的电子邮件中的预加载文本中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20208010/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com