object_setInstanceVariable is unavailable: not available in automatic reference counting mode

object_setInstanceVariable is unavailable: not available in automatic reference counting mode


翻译过来意思是object_setInstanceVariable不能再ARC的模式下使用


解决方法:

1.要么把XCODE项目改成MRC  

2.要么换一个方法,本人测试,可以换objc_setAssociatedObject方法来替代



你可能感兴趣的:(IOS)