OK, seeing that you need some kind of code, I see that it is suitable for a complete tutorial (I'm bored, let it do it!).
Open Xcode and run a new Utility-based project (DON'T MISS THE OLD ONE) and name it "PinchZoomingImages" (without quotes). Make sure ARC is off, I like to code the old fashioned way;). 
We will use UIScrollView with UIImage . Go to the appropriate name "MainViewController.h" and paste this code:
We need the UIImageView and UIScrollView pointers because we will define them in the .m file. Talk about the devil, in .m, paste this into everything:
SCREECH! Did you notice this line here ?:
demoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"PDF-icon.png"]];
What will break your project. you need to drag the image and copy its name verbatim (this is cAsE SeNsTiVe) into the message [UIImage imageNamed:@"//your image name + extension"] .
Also pay attention to this line in the method -(void)viewDidLoad :
scrollView.delegate = self;
This is why we put UIScrollViewDelegate in a couple of them: "<>" in the .h file, because we need to tell the compiler that we want to "conform" to the UIScrollViewDelegate protocol.
And finally, plug in these IBOutlets (please plug in the view first, if it does not already exist. This is a simple and easily forgotten thing): 
and here is what the final product looks like (after launch): 
(When scaling, which you can do by holding the βoptionβ button in the simulator and dragging the mouse):
