9
是否有服務可以從應用程序中添加URL到iOS Safari的閱讀列表。iOS UIActivity視圖控制器:添加到閱讀列表按鈕?
我將有一個URL添加和一個UIWebView,但我已經研究,我找不到任何東西。
這是我工作的UIActivityViewController。
-(IBAction)actionButton:(id)sender;{
NSLog(@"shareButton pressed");
NSURL *URL = [NSURL URLWithString:self.feedItem[@"url"]];//this is your text string
NSArray *activityItems = @[URL];
ARChromeActivity *chromeActivity = [[ARChromeActivity alloc] init];
TUSafariActivity *TUSafari = [[TUSafariActivity alloc] init];
MLCruxActivity *cruxActivity = [[MLCruxActivity alloc] init];
NSArray *applicationActivities = [NSArray arrayWithObjects:TUSafari,chromeActivity,cruxActivity, nil];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities: applicationActivities];
activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:applicationActivities];
activityVC.excludedActivityTypes = @[UIActivityTypeAssignToContact];
[self presentViewController:activityVC animated:TRUE completion:nil];
}
試圖找出如何做到這一點,沒有運氣...... – ToddH 2013-03-20 18:02:16
它似乎應該很容易實現,因爲當你按住一個鏈接,它會詢問你是否要「添加到閱讀列表「,它在Safari中。但我找不到任何東西。 – Steve 2013-03-20 19:37:34
我已經用iOS 7上提供的新樣本更新了我的答案 – 2013-09-19 07:53:20