我似乎有一个指针问题,我似乎无法解决它.有人可以帮帮我吗?
-(void) connectionDidFinishLoading:(NSURLConnection *)connection{
NSLog(@"Finished Downloading Image: %@" ,[connection.originalRequest.URL absoluteString]);
UIImage *CompiledImage=[UIImage imageWithData:ImageData];
SEL selector=@selector(ImageDownloadingCompleted:Image:);
if([[self Delegate] respondsToSelector:selector]){
[[self Delegate] ImageDownloadingCompleted:self Image:CompiledImage];
}
else{
if(Target){
*Target=CompiledImage;
}
}
// NSLog(@"Image Size:%i", [ImageData length]);
}
Run Code Online (Sandbox Code Playgroud)
Target是类型的私有变量UIImage(声明:UIImage *Target;)
CompiledImage是一个UIImage为好.我想要做的是将目标地址的内容设置为CompiledTarget的内容.这会导致以下错误:
从不兼容的类型'UIImage*__ strong'分配给'UIImage'
我试过了 :
memccpy(__bridge Target, &CompiledImage, sizeof(Target),sizeof(Target));
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
期待的表达