我正在尝试使用 UIActivityViewController 从我的应用程序中共享图像。这是源代码:
UIImage *sourceImage = [[UIImage alloc] initWithContentsOfFile:[[self currentMedia] path]];
NSArray *activityItems = @[sourceImage];
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
avc.excludedActivityTypes = [NSArray arrayWithObjects:UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, nil];
[self presentViewController:avc animated:YES completion:nil];
[avc release];
[sourceImage release];
一切正常,除了一个问题:我在服务选择器中看不到服务名称(电子邮件、Twitter、Facebook 等)。看下面的截图:
难道我做错了什么?