• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS: Adding pinch-zoom to UIImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:30:20 -0800 (PST)

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 <email@hidden>
To: Jon Sigman <email@hidden>
Cc: Fritz Anderson <email@hidden>; Cocoa- Dev List <email@hidden>
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 <email@hidden> 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 <email@hidden>
>To: Jon Sigman <email@hidden>
>Cc: Cocoa- Dev List <email@hidden>
>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 (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
>
_______________________________________________

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

  • Follow-Ups:
    • RE: iOS: Adding pinch-zoom to UIImageView
      • From: Julius Oklamcak <email@hidden>
    • Re: iOS: Adding pinch-zoom to UIImageView
      • From: Fritz Anderson <email@hidden>
    • Re: iOS: Adding pinch-zoom to UIImageView
      • From: David Duncan <email@hidden>
References: 
 >iOS: Adding pinch-zoom to UIImageView (From: Jon Sigman <email@hidden>)
 >Re: iOS: Adding pinch-zoom to UIImageView (From: Fritz Anderson <email@hidden>)
 >Re: iOS: Adding pinch-zoom to UIImageView (From: Jon Sigman <email@hidden>)
 >Re: iOS: Adding pinch-zoom to UIImageView (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: iOS: Adding pinch-zoom to UIImageView
  • Next by Date: Re: iOS: Adding pinch-zoom to UIImageView
  • Previous by thread: Re: iOS: Adding pinch-zoom to UIImageView
  • Next by thread: Re: iOS: Adding pinch-zoom to UIImageView
  • Index(es):
    • Date
    • Thread