Cocoa-dev mailing list (Coco...@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/cocoa-dev-garchive-98506%40googlegroups.com
This email sent to cocoa-dev-ga...@googlegroups.com
> What's the typical way to add pinch capability to a UIImageView?
Put it in a UIScrollView.
— F
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 <coco...@lists.apple.com>
Sent: Tuesday, January 17, 2012 8:11 AM
Subject: Re: iOS: Adding pinch-zoom to UIImageView
Google Voice: (508) 656-0622
Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki
http://blog.ericd.net
> http://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
>
> This email sent to edol...@gmail.com
________________________________
From: Eric E. Dolecki <edol...@gmail.com>
To: Jon Sigman <rf_...@yahoo.com>
Cc: Fritz Anderson <fri...@manoverboard.org>; Cocoa- Dev List <coco...@lists.apple.com>
Sent: Tuesday, January 17, 2012 11:18 AM
> http://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
>
> This email sent to david....@apple.com
--
David Duncan
> 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.
There are excellent tutorials about this, and you would profit from a skimming of the UIScrollView class reference.
The properties you are looking for are .minimumZoomScale and .maximumZoomScale.
— F
_______________________________________________
Cocoa-dev mailing list (Coco...@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:
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.
_______________________________________________
Thanks to everyone for your help!
________________________________
From: Julius Oklamcak <jul...@icodemonks.com>
To: 'Jon Sigman' <rf_...@yahoo.com>
Cc: 'Cocoa- Dev List' <coco...@lists.apple.com>
Sent: Tuesday, January 17, 2012 11:37 AM
Subject: RE: iOS: Adding pinch-zoom to UIImageView