如何绕过某些iOS版本不支持的库?
我有一个项目需要 AlAssetsLibrary 以及 UIImagePickerViewController。我已经创建了一个用于 IOS 4+ 的 ALAssetsLibrary,但想使用 UImagePickerViewController 用于早期的 IOS。
由于某些代码已在项目中导入 ALAssetsLibrary,并在我的自定义类上创建了 ALAsset 对象的实例变量。当使用不同的 IOS 版本转移不同的设备时,有没有办法隐藏代码中的这些变量和 import 语句。
I have a project that require AlAssetsLibrary as well as UIImagePickerViewController. I have created one use ALAssetsLibrary for IOS 4+ but want to use UImagePickerViewController for earlier IOS.
Since some of the code have imported the ALAssetsLibrary within the project and have created an instance variable of the ALAsset object on my custom class. Is there a way of hiding those variables and the import statement within the code when shifting different device with different IOS version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你需要使用“弱链接”来解决这个问题。
以下是打开弱链接的指南: http://www.vellios.com/2010/07/04/using-ios-4-frameworks-on-os-3/
You need to use "weak linking" to solve this problem.
Here's a guide for turning on weak linking: http://www.vellios.com/2010/07/04/using-ios-4-frameworks-on-os-3/