presentOpenInMenuFromRect未显示

时间:2015-11-04 16:03:17

标签: ios swift

我想创建Instagram分享:

@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>

我做错了什么?我的班级很常见UIViewController

0 个答案:

没有答案