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