呈现视图控制器时应用程序崩溃

时间:2017-07-23 19:23:40

标签: swift

我以模态方式呈现视图控制器,然后呈现活动视图控制器。但是,当我这样做时,应用程序崩溃并出现错误:

libc++abi.dylib: terminating with uncaught exception of type nsexception ios 10 "self.present"

这是导致应用崩溃的原因:

let vc = UIActivityViewController(activityItems: [shareText], applicationActivities: [])


self.present(vc, animated: true, completion: nil)

我只使用segue

模态显示视图控制器
self.performSegue(withIdentifier: "showContainer", sender: nil)

0 个答案:

没有答案