如何绕过某些iOS版本不支持的库?

发布于 2024-12-27 19:33:42 字数 258 浏览 1 评论 0原文

我有一个项目需要 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开雨落又逢春i 2025-01-03 19:33:42

你需要使用“弱链接”来解决这个问题。

以下是打开弱链接的指南: 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文