Ios PresentOpenMinumeFromRect不显示
我想创建instagram共享:Ios PresentOpenMinumeFromRect不显示,ios,swift,Ios,Swift,我想创建instagram共享: @IBAction func instagramButtonPushed(sender: UIButton) { ... //Safe to post let fileURL = NSURL(fileURLWithPath: writePath) self.documentController = UIDocumentInteractionContro
@IBAction func instagramButtonPushed(sender: UIButton) {
...
//Safe to post
let fileURL = NSURL(fileURLWithPath: writePath)
self.documentController = UIDocumentInteractionController(URL: fileURL)
self.documentController.delegate = self
self.documentController.UTI = "com.instagram.exclusivegram"
self.documentController.annotation = NSDictionary(object: captionString, forKey: "InstagramCaption")
self.documentController.presentOptionsMenuFromRect(self.view.bounds, inView: self.view, animated: true)
...
}
当我单击此按钮时:
self.documentController.presentOptionsMenuFromRect(self.view.bounds, inView: self.view, animated: true)
造成错误
"<NSLayoutConstraint:0x191f8920 H:[UIView:0x192bdcc0(402)]>",
"<NSLayoutConstraint:0x192c2850 _UIAlertControllerView:0x192bd6a0.width >= UIView:0x192bdcc0.width>",
"<NSLayoutConstraint:0x193d3d30 _UIAlertControllerView:0x192bd6a0.width == UIView:0x19120540.width>",
...
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x192deb10 UIView:0x192bde10.bottom == UICollectionView:0x1821ee00.bottom>
我做错了什么?我的类是common UIViewController查看此链接可能对您有帮助否,它没有帮助。。。