我有一个UIScrollView,里面是UIImageViews所有198 * 198pts。此滚动视图中的图像似乎都略微扭曲。边缘更加锯齿状(我正在使用png文件,图像是卡通/贴纸)。在UIScrollView中未包含的普通UIImageView中,它们看起来很好。谁能给我一些指示,说明为什么会发生这种情况?
UIView *content = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.scrollView.frame.size.width*[self.stickers count], self.scrollView.frame.size.height)];
for(int i=0; i<[self.stickers count]; i++){
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(i*self.scrollView.frame.size.width, 0, self.scrollView.frame.size.width, self.scrollView.frame.size.height)];
MySticker *sticker = self.stickers[i];
imageView.image=sticker.image;
imageView.contentMode=UIViewContentModeScaleAspectFill;
[content addSubview:imageView];
//NSLog(@"scroll view width is %f",self.scrollView.frame.size.width);
//NSLog(@"ImageView width is %f", imageView.frame.size.width);
}
self.scrollView.contentSize=CGSizeMake(content.frame.size.width ,content.frame.size.height);
[self.scrollView addSubview:content];
EDIT ^添加了上面的滚动视图设置