Yep, specifying a delegate and implementing -viewForZoomingInScrollView: did 
the trick! (As a newb, I thought this functionality was innate in UIImageView, 
but...)

Thanks to everyone for your help!



________________________________
 From: Julius Oklamcak <juli...@icodemonks.com>
To: 'Jon Sigman' <rf_...@yahoo.com> 
Cc: 'Cocoa- Dev List' <cocoa-dev@lists.apple.com> 
Sent: Tuesday, January 17, 2012 11:37 AM
Subject: RE: iOS: Adding pinch-zoom to UIImageView
 
You need to implement the -viewForZoomingInScrollView: UIScrollViewDelegate
method and return the image view.

Please have a look at Apple's ScrollViewSuite sample code:

http://developer.apple.com/library/ios/#samplecode/ScrollViewSuite/Introduct
ion/Intro.html

> I just added this:
>    [scrollView setContentSize:CGSizeMake(128.0,96.0)];
> Now I can move the image about within the UIScrollView, but I can't
pinch/zoom it.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to