我刚开始使用 Adobe Creative Cloud SDK,但遇到如下所述的错误。
unknown:0: error: 'AdobeImageEditorPremiumAddOn' is unavailable __ObjC.AdobeImageEditorPremiumAddOn:1:38: note: 'AdobeImageEditorPremiumAddOn' has been explicitly marked unavailable here @availability(*, unavailable) struct AdobeImageEditorPremiumAddOn : RawOptionSetType
一旦我插入下面的代码就会产生这个错误
var imageView = AdobeUXImageEditorViewController(image: UIImage(named:"image.png"))
imageView.delegate = self
self.presentViewController(imageView, animated: true, completion: nil)
即使按照他们提到的方式添加应用程序框架
最佳答案
我发现的唯一解决方法是创建一个桥接头并从 Swift 调用它,如下所示
这是 objective-c
[[AdobeUXImageEditorViewController alloc] initWithImage:[UIImage imageNamed:@"img.jpg"]];
[editorController setDelegate:self];
[self presentViewController:editorController animated:YES completion:nil];
然后从 swift 中调用上面的代码,如下所示
var view = objcViewController()
self.navigationController!.presentViewController(view, animated: true, completion: nil)
如果有任何更好的方法来完成它,请告诉我。
关于ios - Adobe Creative SDK iOS Swift 'AdobeImageEditorPremiumAddOn' 不可用错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28944907/