- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们最近发现我们的 UIActivityViewController 实现调用呈现 MailComposerVC、消息、facebook 和 twiter VC 的模态视图时存在问题。在所有旧设备上,所需的消息编辑器打开并允许用户在点击事件表上的图标后编写消息。在 64 位设备和 64 位模拟器上,当用户点击相关图标时,事件失败(正常)并且我们在控制台中看到以下错误:
2013-11-08 12:13:00.885 2life[24880:a0b] Cannot find executable for CFBundle 0xd2795d0 (not loaded)2013-11-08 12:13:00.891 2life[24880:a0b] Launch Services: Registering unknown app identifier com.apple.mobilemail failed2013-11-08 12:13:00.892 2life[24880:a0b] Launch Services: Unable to find app identifier com.apple.mobilemail2013-11-08 12:13:09.267 2life[24880:a0b] _serviceViewControllerReady:error: Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)"
Does anyone have any insight on this?Here's our method:
- (void)showShareView:(NSIndexPath *)indexPath
{
NSString *text = NSLocalizedString(@"tellAFriendText", @"This is deault text sting for the message.");
//NSString *text = @"Test";
UIImage *image = [UIImage imageNamed:@"tell-a-friend.png"];
NSArray *activityItems = [NSArray arrayWithObjects: text, image, nil];
UIActivityViewController * activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
// activityController.tintColor = [UIColor colorWithWhite:1.0f alpha:0.8f];
NSArray *exclusions = @[UIActivityTypeSaveToCameraRoll,UIActivityTypeAssignToContact,UIActivityTypeCopyToPasteboard,UIActivityTypePrint];
activityController.excludedActivityTypes = exclusions;
if (iPhone) {
[self presentViewController:activityController animated:YES completion:nil];
}else if(iPad){
UIPopoverController *pop = [[UIPopoverController alloc] initWithContentViewController:activityController];
popover = pop;
CGRect rect = [self.menuTableView rectForRowAtIndexPath:indexPath];
rect.origin.x = (rect.size.width - rect.size.width/2)/2;
rect.size.width /= 2;
rect.size.height /= 2;
[pop presentPopoverFromRect:rect inView:self.menuTableView permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
}
}
最佳答案
我们最近解决了这个问题。事实证明,使用 UIAppearnce 调整 BarButtonTitlePosition 的位置会导致 composer ViewControllers 退出。注释掉以下内容可以解决问题。
[[UIBarButtonItem 外观] setBackButtonTitlePositionAdjustment:UIOffsetMake(0.0f, -2.0f) forBarMetrics:UIBarMetricsDefault];
关于ios - UIActivityController 与 64 位设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19913865/
我提到了很多与此相关的问题,大多数问题似乎都得到了解决,因为 OP 正在模拟器上尝试,而不是在真实设备上。 我一直在尝试两者,但我看到的只是下面的图片。我之前在不同的项目中使用过相同的代码并取得了成功
我需要在 ios6 的 UIActivityViewController 中添加一个自定义按钮,并在点击按钮时获取其 IBAction 方法。这可能吗? 最佳答案 我可以给你一个解决方法。先做一个UI
我向我的应用添加了一个 activityViewController,如下所示,传入了一张图片 UIActivityViewController *avc = [[UIActivityViewCont
我已经隔离了 setExcludedActivityTypes 数组的内存泄漏。见下面的代码: - (void)postToFacebook:(UITapGestureRecognizer *)sen
我试图在 UITableViewController 之上呈现一个自定义大小的 UIViewController 而不关闭 UITableViewController 但我做不到。我所能做的就是将 U
我拿了一个 default.png 文件并将其作为我的初始屏幕,我让它休眠了几秒钟以使其可见。 但是我还想给它添加一个UIActivityController。因为我没有使用任何 ViewContro
我正在展示 UIActivityController 但它在屏幕上显示了一半。 let textToShare = "This is awesome! Check out this website
目前,每当用户想要使用 UIActivityController 共享图像时,我都会发送图像和文本。这在 email 和 gmail 上工作正常,但它在 whatsapp 或 Skype 上变得困惑(
我想更改关于用户选择的共享类型的消息正文内容,我该怎么做?现在我可以在初始化时设置一个值,我该如何更改它?任何指针表示赞赏 最佳答案 参见UIActivityItemSource协议(protocol
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:items applic
我试图通过我的应用程序在 Facebook 和 Twitter 上分享一些文本。我进行了搜索,找到了一段代码来执行此操作并且运行良好,但是我无法理解编译器的响应,因为它看起来有问题。代码是 NSArr
我正在尝试使用 UIActivityController 时出现的文本的标题文本颜色。文本阅读,“点击以通过 AirDrop 共享”。我想让它变成白色而不是默认的颜色,它看起来是灰色的。 我已经找了很
我用 UIActivityViewController 创建了 @IBAction。 @IBAction func shareButton(_ sender: Any) { let t
我实现了一个简单的UIActivityViewController如下 let activityController = UIActivityViewController(activityItems:
我们最近发现我们的 UIActivityViewController 实现调用呈现 MailComposerVC、消息、facebook 和 twiter VC 的模态视图时存在问题。在所有旧设备上,
我有一段简单的代码来显示多个社交 channel 的共享对话框: let text = String(format:NSLocalizedString("I %@ with the Dhammapad
我在我的项目中添加了 UIActivityController。看起来在这个特定主题上可用的帮助要少得多。我面临的问题是链接以一种奇怪的方式在 Facebook 上共享,而不是它们通常在 Facebo
我想分享在应用程序中创建的 URL 文件和文本。但它似乎只能共享文本,不能共享 URL 或 UIImage 等任何数据。我使用的代码: let sharedVideo = Video(Title: _
我正在尝试使用 requestAVAsset 通过 UIActivityController 分享视频 PHAsset。这适用于 Messaging,但不适用于 AirDrop,指示为“失败”。 PH
我想在 uiactivitycontroller 中仅显示邮件、消息和 Whatsapp。 排除事件类型仅排除默认类型并显示其他类型。 有没有办法只显示上述事件。 提前致谢 最佳答案 只需将名为 sh
我是一名优秀的程序员,十分优秀!