gpt4 book ai didi

ios - UIActivityController 与 64 位设备

转载 作者:行者123 更新时间:2023-11-29 13:00:25 26 4
gpt4 key购买 nike

我们最近发现我们的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com