1
我想要“打开”菜单让我的应用程序打开一个文件,另一个用户可以选择。 这是我的代码,但我不能让它工作Swift:打开“在菜单中”选项
var url: NSURL! = NSBundle.mainBundle().URLForResource(filename, withExtension: "pbz")
self.controller = UIDocumentInteractionController(URL: NSBundle.mainBundle().URLForResource(filename, withExtension: "pbz")!)
let v = sender as UIView
let ok = self.controller.presentOpenInMenuFromRect(v.bounds, inView: self.view, animated: true)
你有想过这事?它编译但在运行时在第二条指令处给我一个EXC_BAD_INSTRUCTION错误。 熟悉的代码为我工作Objective-C
你说得对:d也感谢为解决方案 – FrCr 2014-10-07 06:28:47