无法在 Skype 上使用 UIAcivityViewController 共享图像。另外 Skype 选项在 iPhone 上的照片应用程序中不可用,为什么?不过,所有其他共享应用程序都可用。
IImage *img = [self imageWithView:self.viewSubContailer];
NSString* str = [NSString stringWithFormat:@"Test"];
NSArray *arrActivityItems = @[img,str];//
UIActivityViewController * avc = [[UIActivityViewController alloc] initWithActivityItems:arrActivityItems applicationActivities:nil];
[avc setValue:@"Test" forKey:@"subject"];
NSLog(@"self.delegate : %@",self.delegate);
[(TestViewController*)self.delegate presentViewController:avc animated:YES completion:nil];
if([[UIApplication sharedApplication] respondsToSelector:(@selector(setCompletionWithItemsHandler:))]){
[avc setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray *returnedItems, NSError *activityError) {
NSLog(@"ERROR ON cancel:%@",activityError);
[self.delegate cancelSharingAction];
}];
}else{
[avc setCompletionHandler:^(NSString *activityType, BOOL completed) {
[self.delegate cancelSharingAction];
}];
}
最佳答案
您可以分享到 Skype 或图像或字符串 - 当您发送两者时,它只需要字符串:\
关于iOS:Skype 在 UIActivityViewController 中无法用于图像共享,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33436020/