1 /* 需要得到一个图片的放大比例,这个比例就是屏幕的宽度与图片真实宽度的比值 */ 2 CGFloat newZoomScale = LZ_SCREEN_WIDTH / [_photoImageView.image size].width; 3 CGFloat xsize = self.bounds.size.width / newZoomScale; 4 CGFloat ysize = self.bounds.size.height / newZoomScale; 5 [self zoomToRect:CGRectMake(- xsize/2, - ysize/2, xsize, ysize) animated:YES];