0
即时通讯使用AQgridview显示Facebook相册,并且每次在整个屏幕上按下其中一个屏幕时,都会显示一个带有该图像的视图。正确显示单个图像
问题是我只是无法让它显示正确,它看起来质量很差。首先,我试图在整个屏幕上伸展它,无论原始大小,它看起来很糟糕,现在我写了一些代码,以保持原始宽度作为原始图片的高度配给,仍然没有ciger,任何帮助?
if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait)
{
if (width<=320 && height<=480)
{
[self.photo setFrame:CGRectMake(0, 0, width,height)];
}
else if (320/width <= 480/height)
{
double number = (double) height*320/width;
NSLog(@"work: %f", number);
[self.photo setFrame:CGRectMake(0, 0, 320,number)];
}
else if (480/height < 320/width)
{
double number = (double) width*480/height;
NSLog(@"work: %f", number);
[self.photo setFrame:CGRectMake(0, 0, 480/height*width,480)];
}
[self.photo setImageWithURL:self.photoURL];
你知道最新的问题吗?或者任何人都可以提供某人准备正确展示图像的课程?我听说很多照片库准备上课,但他们似乎没有支持弧