我想在 Facebook、Twitter、Google+、LinkedIn 等多个社交平台上共享数据。它适用于 Instagram 应用程序,但我如何在我的 iOS 应用程序中实现...
问问题
572 次
1 回答
0
NSArray *objectsToShare = @[_s_image]; UIActivityViewController * avc = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
avc.excludedActivityTypes=@[UIActivityTypePostToTwitter];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
[self presentViewController:avc animated:YES completion:nil];
}
else
{
UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:avc];
[popup presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0)inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
于 2017-06-01T09:17:35.637 回答