We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b91b0e commit 097f50bCopy full SHA for 097f50b
_posts/2020-11-03-ARC与MRC混合使用.md
@@ -0,0 +1,35 @@
1
+---
2
+layout: post
3
+title: ARC 与 MRC 混合使用
4
+subtitle: MRC 库的处理
5
+date: 2020-11-03
6
+author: BY
7
+header-img: img/post-bg-cook.jpg
8
+catalog: true
9
+tags:
10
+ - iOS
11
12
+
13
14
15
+## Xcode 项目中我们可以使用 ARC 和非 ARC 的混合模式。
16
17
+> 有些时候我们工程中引用了十分古老的库为MRC模式,这时就需要采用混合模式进行处理
18
19
+- 如果你的项目使用的 MRC 模式,要为 ARC 模式的代码文件加入 `-fobjc-arc` 标签。
20
21
22
+- 如果你的项目使用的是 ARC 模式,要为 MRC 代码文件加入 `-fno-objc-arc` 标签
23
24
+添加标签的方法:
25
26
+打开:你的`target -> Build Phases -> Compile Sources`
27
28
+双击对应的 *.m 文件
29
30
+在弹出窗口中输入上面提到的标签 `-fobjc-arc` 或 `-fno-objc-arc`
31
+点击 done 保存
32
33
+
34
35
0 commit comments