【发布时间】:2015-10-30 12:29:28
【问题描述】:
无法在 Skype 上使用 UIAcivityViewController 共享图像。 iPhone 上的照片应用程序中也没有 Skype 选项,为什么?虽然,所有其他共享应用程序都可用。
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 然后检查是否显示选项:stackoverflow.com/questions/18956620/…
-
感谢您的快速回复,但我已经登录了。
-
你也没有在excludedActivityTypes中添加Skype?请分享你的uiactivityviewcontroller代码
标签: ios sharing skype uiactivityviewcontroller