“Pinch to Zoom” using AutoLayout

爱⌒轻易说出口 提交于 2019-12-06 08:58:36

问题


I have followed many "Pinch to Zoom" tutorials I found online, and have done reading on AutoLayout, but I can't get it to work in my project.

My whole project uses AutoLayout, so I don't want to turn it off. I am loading a huge UIImage (EG: 5000px on long edge) into a UIImageView, and i'd like to be able to pinch to zoom and move around the zoomed in image.

I've tried using UIImageView inside a UISrollView, but I couldn't get it to work properly. The closest I could get was some random "glitching" where the image moved erratically when pinched.

Has anybody got 'Pinch to Zoom' to work using Autolayout in iOS 6? I don't care if it uses UIScrollView or something else, I'd just love to get it to work.

Thanks,

Isaac

来源:https://stackoverflow.com/questions/14513170/pinch-to-zoom-using-autolayout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!