如何将文档提供程序扩展放在导航控制器中以使用push和pop方法? iCloud文档提供程序使用它,所以我认为这是可能的,但是当我在导航控制器中嵌入文档提供程序控制器时,我收到一个例外。当我选择我的文档提供者时,我会在屏幕上收到提示消息"无法启动' 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
)}'.
答案 0 :(得分:1)
您必须在.h
上添加所需的属性IBOutlet @interface DocumentPickerViewController : UIDocumentPickerExtensionViewController {
IBOutlet UILabel *description;
}
@property (retain, nonatomic) IBOutlet UILabel *description;
在.m:
@implementation DocumentPickerViewController
@synthesize description;
最后,您必须在StoryBoard上链接IBOutlet
如果您使用具有32位体系结构的扩展,也可能会出现相同的错误。
要解决此问题,您必须在构建设置的部分中更改文档提供程序的目标中的项目。将$(ARCHS_STANDARD_32_BIT)构造为$(ARCHS_STANDARD)&lt; - 这是64位