2014-01-27 108 views
0

我正在使用UIActivityViewController在我的項目中共享和郵寄。UIActivityViewController中缺少共享服務

但只有郵件服務和消息服務顯示,但不是臉譜,微博和其他服務。顯示UIActivityviewController

NSURL *shareUrl = [NSURL URLWithString:@"http://www.captechconsulting.com"]; 
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; 
activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; 


[self presentViewController:activityViewController animated:YES completion:nil]; 

OS

NSArray *activityItems = [NSArray arrayWithObjects: shareUrl, nil]; 

//代碼:ios7

是否依賴於iPhone設置? 我已經啓用權限和我嘗試過,但結果是一樣的....

回答

1

你必須在你的設備設置添加帳戶,

Setting > Facebook
Setting > Twitter

設置它比嘗試,

NSURL *shareUrl = [NSURL URLWithString:@"http://www.captechconsulting.com"]; 
NSArray *activityItems = [NSArray arrayWithObjects: shareUrl, nil]; 
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; 
activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; 

[self presentViewController:activityViewController animated:YES completion:nil]; 

如果您分享的圖像也比相關的活動將顯示。

相關問題