June 11, 2018

错误提示:’retain’ is unavailable: not available in automatic reference counting

 

1)检查项目是否ARC(一般都是)

target / Build Settings /  搜索Automatic

2)支持ARC和非ARC混合

target / Build Phases / Compile Sources

双击文件,

要支持ARC,写-fobjc-arc

要支持非ARC,写-fno-objc-arc

 



Contributed by Shark

Leave a Reply

Your email address will not be published. Required fields are marked *