【IOS异常汇总】之 implicit conversion of Object-C pointer type"NSString *" to C pointer type "const void *"

项目"NSObject+KVC.m"文件中遇到一个转换问题:implicit conversion of Object-C pointer type"NSString *" to C pointer type "const void *"


#import "NSObject+KVC.h"


@implementation NSObject(aa)

- (id)valueForUndefinedKey:(NSString *)key{

    returnobjc_getAssociatedObject(self,objc_unretainedPointer(key));

}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{

    objc_setAssociatedObject(self,objc_unretainedPointer(key), value,OBJC_ASSOCIATION_RETAIN_NONATOMIC);

}

@end


项目勾选了ARC机制造成的加上蓝色部分 即可。

sometimes 

(__bridge void *)self

你可能感兴趣的:(conversion,Implicit)