[英]Objc to swift bridge `use of undeclared identifier 'cocoarr'`
[英]use of undeclared identifier '_bridge'
我的objective-c项目包含C库,它们具有:
void* ptr;
ViewController有:
UIImageView pic;
pic = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ground.png"]];
cLoad cload; // C-class object
cload.ptr = (_bridge void*) pic;
我使用ARC,但我不明白为什么我收到错误消息: use of undeclared identifier bridge
谢谢)))
cload.ptr = (__bridge void*) pic;
__bridge ,有两个下划线......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.