我在ios7中使用UIActivity
。只需几行代码即可正常工作。现在我想添加Instagram分享按钮。有没有办法将自定义按钮添加到操作表?
这就是我创建UIActivityViewController
:
NSString *textToShare = self.navigationItem.title;
NSArray *itemsToShare = @[textToShare, [imagesArray objectAtIndex:afImgViewer.currentImage]];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact]; //or whichever you don't need
[self presentViewController:activityVC animated:YES completion:nil];