xcode7.3编译会有这个编译错误: NSObject+YYAddForKVO.h 方法:- (void)addObserverBlockForKeyPath:(NSString*)keyPath block:(void (^)(__weak id _Nonnull obj, _Nullable id oldVal, _Nullable id newVal))block; 错误:Cannot create __weak reference in file using manual reference counting
Activity
ibireme commentedon Mar 23, 2016
请更新到最新版本(1.0.3)试试,昨天刚改好。
wy19901227 commentedon Mar 23, 2016
Pod 上最新的还是1.01呀
ibireme commentedon Mar 23, 2016
执行
pod setup
来更新你的本地列表。wy19901227 commentedon Mar 23, 2016
额,是以后xcode在arc 模式下id类型不能用__weak了,还是xcode的bug?
ibireme commentedon Mar 23, 2016
错误提示说不能在 MRC 下使用 __weak,但这个头文件应该没有被引入 MRC 文件下编译,所以我觉得这可能是 Xcode 的问题。
wy19901227 commentedon Mar 23, 2016
是啊,我也觉得是xcode问题,所以你这样改了,会引起什么问题吗?
发自我的 iPhone
ibireme commentedon Mar 23, 2016
这块儿代码倒是无所谓。。没什么影响