我正在使用第三方庫,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