The preferred method for creating an image you can zoom and pan on is to nest a UIImageView inside a UIScrollView. see example here
But in a recent project I found myself needing to highly customize how this performed. My first step was recreating the functionality of UIScrollView wining a UIImageView itself. What I mostly needed to change as far as behaviour was to change the panning speed as well as turning off the pan gesture at specific times so that the image view could exist inside another class that also responded to the pan gesture.
Heres the code: