解决方法
您可以使用简单活动控制器来显示默认共享应用程序:
NSArray *activityItems = [NSArray arrayWithObjects:shareString,shareImage,shareUrl,nil]; UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentViewController:activityViewController animated:YES completion:nil];
你也可以使用它的完成处理程序:
[activityViewController setCompletionHandler:^(NSString *act,BOOL done) { //Code here when the action performed. }];
这将显示所有默认共享应用程序.