我是Objective C的新手,我正在尝试在我的项目中使用套接字,这是我的代码
NSInputStream *inputStream;
NSOutputStream *outputStream;
NSInputStream *iStream = objc_unretainedObject(readStream);
NSInputStream *iStream = objc_unretainedObject(readStream);
我得到“objc_unretainedObject不可用:使用(_bridge id)强制转换”错误@第3行和第4行
提前致谢
答案 0 :(得分:0)
将objc_unretainedObject替换为(__bridge void *).. so:
NSInputStream *inputStream;
NSOutputStream *outputStream;
NSInputStream *iStream = (__bridge void *)(readStream);
NSInputStream *iStream = (__bridge void *)(readStream);