gpt4 book ai didi

ios - 将 URL 转换为超链接

转载 作者:行者123 更新时间:2023-11-29 00:13:18 25 4
gpt4 key购买 nike

我正在开发一个应用程序,我在其中与一些 url 共享事件图像分享事件图片时,我正在使用此内容:=

“嘿!我刚刚通过 XXXX 应用程序看到“ field 名称”有“事件名称”!我们应该检查一下。 https://app.com/site/redirectlink?event_id=%@ "

现在我可以将这个“https://app.com/site/redirectlink?event_id=%@”链接到超链接“这里”吗?

我正在通过“UIActivityViewController”共享此内容。实际上,此 URL ( https://app.com/site/redirectlink?event_id=%@) 稍后用于深度链接,当用户单击此链接时,它将重定向到特定事件,具体取决于 event_id。而不是在整个 URL 上我只想在这里使用(作为超链接)。

最佳答案

可能会以这种方式帮助你..

NSString *url=@"https://app.com/site/redirectlink?event_id=%@";
NSString * title =[NSString stringWithFormat:@"Hey! I just saw \"Venue Name\" is having \"Event Name\" through the XXXX App! We should check it out <html> <body> <a href = '%@'>here</a> </body> </html>",url];
NSArray* dataToShare = @[title];
UIActivityViewController* activityViewController =[[UIActivityViewController alloc] initWithActivityItems:dataToShare applicationActivities:nil];
activityViewController.excludedActivityTypes = @[UIActivityTypeAirDrop];
[self presentViewController:activityViewController animated:YES completion:^{}];

关于ios - 将 URL 转换为超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45814568/

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