作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何将文档提供程序扩展放入导航 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/
我是一名优秀的程序员,十分优秀!