Ok, I found a solution to configure the UIActivityViewController myself:
if you want to get rid of sharing options like weibo, facebook, etc ... it's absolutely simple, just set the ExcludedActivityTypes property:
UIActivityViewController *actionCtrl = [[UIActivityViewController alloc]initWithActivityItems:act applicationActivities:nil]; [actionCtrl setExcludedActivityTypes:@[UIActivityTypeAssignToContact, UIActivityTypeCopyToPasteboard, UIActivityTypeMail, UIActivityTypePostToWeibo]]; [self presentViewController:actionCtrl animated:YES completion:nil];
If you want to add another action (button or image, etc.), you need to subclass UIActivity and overwrite some methods such as activityType and activityImage.
i.e.
- (UIImage *)activityImage { return [UIImage imageNamed:@"icon"]; }
You too will help you guys!
source share