一个zoomScale的怪坑
//重置单元格内元素尺寸 func resetSize() { scrollView.frame = self.contentView.bounds scrollView.contentSize = self.contentView.bounds.size scrollView.zoomScale = 1.0 }
View层次为 scrollView + imageView 通过代码调整元素的frame,但是加了zoomScale,当imageView的宽度大于scrollView的时候,则显示不正常,出现下图情况图片右边出现多余空块,删除scale后则正常