You need to set the min/max magnification properties as well. You may also need 
to implement the delegate protocol to tell the scroll view which view to zoom 
as well (I'm almost certain this is necessary, but I haven't done this in a 
little bit).

On Jan 17, 2012, at 11:30 AM, Jon Sigman wrote:

> 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.
> 
> 
> 
> ________________________________
> From: Eric E. Dolecki <edole...@gmail.com>
> To: Jon Sigman <rf_...@yahoo.com> 
> Cc: Fritz Anderson <fri...@manoverboard.org>; Cocoa- Dev List 
> <cocoa-dev@lists.apple.com> 
> Sent: Tuesday, January 17, 2012 11:18 AM
> Subject: Re: iOS: Adding pinch-zoom to UIImageView
> 
> 
> Did you set the contentSize for the scroll view?
> 
> 
> 
> 
> 
>   Google Voice: (508) 656-0622
>   Twitter: eric_dolecki      XBoxLive: edolecki      PSN: eric_dolecki
>   http://blog.ericd.net
> 
> 
> 
> On Tue, Jan 17, 2012 at 2:11 PM, Jon Sigman <rf_...@yahoo.com> wrote:
> 
> Here's what I've tried:
>> 
>> IBOutlet UIScrollView *scrollView;  // created & placed on GUI with IB
>> 
>> @synthesize scrollView;             // hooked up from w/in IB
>> 
>> - (void)viewDidLoad {
>>     [super viewDidLoad];
>>     imageView = [[UIImageView alloc] initWithImage:[UIImage 
>> imageNamed:@"default.png"]];
>>     [scrollView addSubview:imageView];
>>     return;
>> }
>> 
>> The UIScrollView & UIImageView show up on the GUI, with the correct image, 
>> but gestures are ignored. What am I overlooking?
>> 
>> 
>> 
>> 
>> 
>> ________________________________
>>  From: Fritz Anderson <fri...@manoverboard.org>
>> To: Jon Sigman <rf_...@yahoo.com>
>> Cc: Cocoa- Dev List <cocoa-dev@lists.apple.com>
>> Sent: Tuesday, January 17, 2012 8:11 AM
>> Subject: Re: iOS: Adding pinch-zoom to UIImageView
>> 
>> 
>> On 16 Jan 2012, at 3:57 PM, Jon Sigman wrote:
>> 
>>> What's the typical way to add pinch capability to a UIImageView?
>> 
>> Put it in a UIScrollView.
>> 
>>     — F
>> _______________________________________________
>> 
>> 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/edolecki%40gmail.com
>> 
>> This email sent to edole...@gmail.com
>> 
> _______________________________________________
> 
> 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/david.duncan%40apple.com
> 
> This email sent to david.dun...@apple.com

--
David Duncan

_______________________________________________

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