我可以知道使用从 url 获取后调整图像大小的任何方法AsyncImageView
吗?这是我到目前为止的代码:
NSLog(@"image x:%f y:%f", _imageView.frame.origin.x, _imageView.frame.origin.y);
NSLog(@"image w:%f h:%f", _imageView.frame.size.width, _imageView.frame.size.height);
NSLog(@"image w:%f h:%f", _imageView.image.size.width, _imageView.image.size.height);
_imageView.image = [UIImage imageNamed:@"Placeholder.png"];
//cancel loading previous image for cell
[[AsyncImageLoader sharedLoader] cancelLoadingImagesForTarget:_imageView];
//load the image
_imageView.imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@",[AppSetting getPkParkingPhotoPath],[_data objectForKey:@"photo"]]];
_imageView.contentMode = UIViewContentModeScaleAspectFill;
NSLog(@"image x:%f y:%f", _imageView.frame.origin.x, _imageView.frame.origin.y);
NSLog(@"image w:%f h:%f", _imageView.image.size.width, _imageView.image.size.height);
我想获得图像的真实尺寸并调整大小并适合宽度和动态高度。我怎样才能委托onComplete
方法AsyncImageView
?