4
在我的應用程序我想創建一個共享按鈕與Whatsup,臉譜,微博,這樣的郵件。 這裏是我的代碼如何在iOS 9中創建分享按鈕?
-(IBAction)share:(id)sender
{
NSString *shareText = @"Hi This is a Reward Game App";
NSArray *itemsToShare = @[shareText];
UIActivityViewController *activityVC = [[UIActivityViewController alloc]initWithActivityItems:itemsToShare applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypePostToWeibo,UIActivityTypePostToTwitter,UIActivityTypePostToFacebook,UIActivityTypeMail,UIActivityTypeMessage,UIActivityTypeAssignToContact,UIActivityTypePostToTencentWeibo];
[self presentViewController:activityVC animated:YES completion:nil];
}
它只顯示郵件和Facebook的圖標,我想這樣的諾雷的WhatsUp圖標消息。
的可能的複製[如何添加自定義按鈕UIActivityViewController?](http://stackoverflow.com/questions/20029520/how-to-add-custom-buttons-to- uiactivityviewcontroller) –
您無法在模擬器中看到所有應用程序。您必須在設備 – kb920