gpt4 book ai didi

iOS 8 如何将文档提供程序扩展与导航 Controller 一起使用?

转载 作者:行者123 更新时间:2023-11-29 02:43:19 24 4
gpt4 key购买 nike

如何将文档提供程序扩展放入导航 Controller 中以使用推送和弹出方法? iCloud 文档提供者使用它,所以我认为这是可能的,但是当我在导航 Controller 中嵌入文档提供者 Controller 时,我收到一个异常。当我选择我的文档提供者时,我在屏幕上收到警告消息“无法启动‘docProvider’”、“文档选择器‘docProvider’无法启动 (4097)。”

    17545849:_UIScreenEdgePanRecognizerEdgeSettings.edgeRegionSize=13.000000
2014-08-25 10:43:16.948 documentProvider[1851:423858] <NSXPCConnection: 0x15526e50> connection from pid 1849: Warning: Exception caught during decoding of received message, dropping incoming message.
Exception: Exception while decoding argument 0 (#2 of invocation):
<NSInvocation: 0x1554f0d0>
return value: {v} void
target: {@} 0x0
selector: {:} __connectToViewControllerFromRemoteViewController:replyHandler:
argument 2: {@} 0x0
argument 3: {@?} 0x0 (block)

Exception: value for key '<no key>' was of unexpected class '_NSXPCDistantObject'. Allowed classes are '{(
NSNumber,
NSNull,
NSString,
NSData,
NSDate,
NSDictionary,
NSArray
)}'.

最佳答案

您必须在 .h 上添加您需要的属性 IBOutlet

   @interface DocumentPickerViewController : UIDocumentPickerExtensionViewController {

IBOutlet UILabel *description;
}

@property (retain, nonatomic) IBOutlet UILabel *description;

在 .m 处:

   @implementation DocumentPickerViewController

@synthesize description;

最后,您必须在 StoryBoard 上链接 IBOutlet


如果您使用具有 32 位架构的扩展,您也可能会遇到同样的错误。

要解决它,您必须在架构部分的build设置中将文档提供者的目标中的项目从 $(ARCHS_STANDARD_32_BIT) 更改为 $(ARCHS_STANDARD) <- 这是 64 位

关于iOS 8 如何将文档提供程序扩展与导航 Controller 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25470149/

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