用于共享 ios9 中任何内容的 UIActivityViewController 在保存笔记时无法按预期工作
UIActivityViewController to share any content in ios9 , is not working as expected in case of saving notes
UIActivityViewController
在 ios9
中保存笔记时无法按预期共享内容。这是我的一段代码:
title,description,url are contains different contents to share.//
NSArray *dataToShare= @[title,description,url];
UIActivityViewController* activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:dataToShare
applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{}];
非常感谢您提前提出任何意见。
我已经解决了这个问题,方法是将不同的字符串连接成一个以保存 NOTES 中的所有内容。
NSString *url=@"http://itunes.apple.com/us/app/APPNAME/idXXXXXXXXX";
NSString * title =[NSString stringWithFormat:@"Download ECG app %@ and get free reward points!",url];
NSArray* dataToShare = @[title];
UIActivityViewController* activityViewController =[[UIActivityViewController alloc] initWithActivityItems:dataToShare applicationActivities:nil];
activityViewController.excludedActivityTypes = @[UIActivityTypeAirDrop];
[self presentViewController:activityViewController animated:YES completion:^{}];
UIActivityViewController
在 ios9
中保存笔记时无法按预期共享内容。这是我的一段代码:
title,description,url are contains different contents to share.//
NSArray *dataToShare= @[title,description,url];
UIActivityViewController* activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:dataToShare
applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{}];
非常感谢您提前提出任何意见。
我已经解决了这个问题,方法是将不同的字符串连接成一个以保存 NOTES 中的所有内容。
NSString *url=@"http://itunes.apple.com/us/app/APPNAME/idXXXXXXXXX";
NSString * title =[NSString stringWithFormat:@"Download ECG app %@ and get free reward points!",url];
NSArray* dataToShare = @[title];
UIActivityViewController* activityViewController =[[UIActivityViewController alloc] initWithActivityItems:dataToShare applicationActivities:nil];
activityViewController.excludedActivityTypes = @[UIActivityTypeAirDrop];
[self presentViewController:activityViewController animated:YES completion:^{}];