MWPhotoBrowser icon indicating copy to clipboard operation
MWPhotoBrowser copied to clipboard

When I use a small picture occur a dislocation mistaken

Open zhahao opened this issue 9 years ago • 2 comments

When I use a 45*63 picture,it will offset to the lower right corner.but other situations is normal.

zhahao avatar Sep 20 '16 09:09 zhahao

I'm having the same problem here, see this screen shot for example (taken on iPad 2 in portrait orientation, image size is 148x198):

simulator screen shot 12 dec 2016 11 12 00

sryze avatar Dec 12 '16 05:12 sryze

After commenting out these two lines in MWZoomingScrollView it started working:

self.contentOffset = CGPointMake((boundsSize.width - imageSize.width * self.zoomScale) / 2.0,
                                 (boundsSize.height - imageSize.height * self.zoomScale) / 2.0);

I don't fully understand why setting contentOffset messes things up here and this fix probably breaks something else I'm sure but it worked for me.

sryze avatar Dec 12 '16 06:12 sryze