我正在使用第三方库,HJCacheClasses,用于异步加载图像。 以下是相同的代码。其非常直截了当setContentMode:对于HJManagedImageV不适用于iOS
NSMutableString *url = @"my url";
HJManagedImageV *asyncImageView = [[HJManagedImageV alloc] initWithFrame:frame];
[asyncImageView setBackgroundColor:[UIColor grayColor]];
[asyncImageView showLoadingWheel];
[asyncImageView setContentMode:UIViewContentModeScaleAspectFill];
[asyncImageView.imageView setContentMode:UIViewContentModeScaleAspectFill];
asyncImageView.url = [NSURL URLWithString:url];
[self.imageManager manage:asyncImageView];
[the_pScrollView addSubview:asyncImageView];
一切正常,除了图像居中并根据该图(其是全屏幕的尺寸的)的大小,它没有得到拉伸/装配。我知道图像很小,但我需要使它适合视图以填充视图。但是没有setContentMode正在工作。
任何想法
请拍 拉吉
拉吉,每当你用更新的版本更新库时,你必须查看源代码并以指定的方式进行调整。考虑一下 – 2012-05-24 13:34:16