0
我使用aSyncImageView来显示从URL下载的图像 - 图像具有各种不同的尺寸,但我需要显示具有300点固定宽度的图像,但我需要imageView的高度为动态 - 我怎么做?AsyncImageView与固定但动态高度?
我已经看过不同的resizingmasks,但它们都只是适合固定帧大小的图像 - 但我需要帧高度是动态的,因为图片高度可以提高几百点。 问题是我需要设置框架时设置固定的宽度和高度。
AsyncImageView *newsArticleImage = [[AsyncImageView alloc] init];
[newsArticleImage loadImageFromURL:[NSURL URLWithString:[newsResultSet stringForColumn:@"image"]]];
newsArticleImage.frame = CGRectMake(10, (newsArticleDateLabel.frame.origin.y + newsArticleDateLabel.frame.size.height + 5), 300, 50);
newsArticleImage.autoresizingMask = UIViewAutoresizingFlexibleHeight;
没有人对此有任何建议吗?这似乎是应该是相当微不足道的东西。 – Milk78 2011-02-01 12:56:09