您的位置:首页 > 其它

MWPhotoBrowser图片无法左右滚动切换的问题

2015-05-13 16:52 302 查看
使用MWPhotoBrowser浏览大图时有时会出现无法左右滑动切换图片,在github上找到了解决方法(https://github.com/mwaterfall/MWPhotoBrowser/issues/389),在 MWZoomingScrollView.m中的函数 layoutSubviews中添加下面的代码:

self.contentSize = CGSizeMake(floorf(self.contentSize.width), floorf(self.contentSize.height));原文:

in my case, a specific image (width 600 height 1600) can't scroll to others after vertical drag, but after zoom, it can scroll to others, I think it might be due to the fractional part of contentSize or zoom related, tail add the following code to the function
layoutSubviews in MWZoomingScrollView.m, it works for me.

self.contentSize = CGSizeMake(floorf(self.contentSize.width), floorf(self.contentSize.height));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息