Re: iOS: Adding pinch-zoom to UIImageView
Re: iOS: Adding pinch-zoom to UIImageView
- Subject: Re: iOS: Adding pinch-zoom to UIImageView
- From: Jon Sigman <email@hidden>
- Date: Tue, 17 Jan 2012 11:45:51 -0800 (PST)
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 <email@hidden>
To: 'Jon Sigman' <email@hidden>
Cc: 'Cocoa- Dev List' <email@hidden>
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 (email@hidden)
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:
This email sent to email@hidden