- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我为 iOS 4 编写了数千行代码。代码库包含许多对 retain
和 release
的调用,当项目更新到 iOS 5 时会导致错误和 ARC。
有没有办法自动将手动保留释放 (MRR) 代码转换为自动引用计数 (ARC)?
最佳答案
来自 Xcode 4.2 release notes :
To initiate the process, enable Continue building after errors in the General Preferences pane, then choose Edit > Refactor > Convert to Objective-C ARC. The targets that you convert are updated to build using the Apple LLVM compiler. Xcode attempts to build your target and to determine what changes must be made to use ARC. If it finds any issues that prevent conversion, Xcode displays a dialog directing you to review the errors in the Issue navigator. After you correct the errors, choose the Convert to Objective-C Automatic Reference Counting menu item again to restart the ARC-conversion workflow.
关于ios - 如何将Manual Retain-Release代码自动转换为ARC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7874727/
我是一名优秀的程序员,十分优秀!