viv*_*vee 6 ios swift instagram-api ios9 swift2
我有一个应用程序,使用户可以通过文档交互控制器通过Instagram分享.我只想在应用程序列表中显示Instagram,所以在我的代码中,我使用仅限Instagram的文件扩展名.igo(类型为com.instagram.exclusivegram,如文档中所述:https://instagram.com/developer / mobile-sharing/iphone-hooks /).
以下代码有效但在我切换到iOS9后,我看到"Notes"现在也出现在应用程序列表中(而不是之前只显示Instagram).还有其他人遇到过这个问题吗?
let image = self.imageCache.getImage(url)
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
let filePath = documentsPath.stringByAppendingString("/RPImage.igo")
UIImageJPEGRepresentation(image!, 1.0)!.writeToFile(filePath, atomically: true)
let fileUrl = NSURL(string: "file://\(filePath)")
docController = self.setupControllerWithURL(fileUrl!, delegate: self)
docController.UTI = "com.instagram.exclusivegram"
docController.presentOpenInMenuFromRect(CGRectMake(1, 1, 1, 1), inView: self.view, animated: true)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
414 次 |
最近记录: |