• 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
UIScrollView zooming a rotated view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIScrollView zooming a rotated view


  • Subject: UIScrollView zooming a rotated view
  • From: Brian Bruinewoud <email@hidden>
  • Date: Thu, 23 Jun 2011 21:21:09 +1000

Hi All,

I have a UIScrollView that contains a single UIView.
I have a couple of buttons in the toolbar that let me rotate the UIView in 90 degree increments.

When the rotation is 0, zooming via the pinch mechanism works fine.
When the rotation is 90 or 270, zooming via pinch does nothing.
When the rotation is 180, zooming via the pinch works 'backwards', that is, what should expand the image, shrinks it and vice versa.

I've logged the values of the UIView's transform and I guess the issue is that UIScrollView directly manipulates A and D in this matrix.

For rotation = 0, A and B are both 1.
For rotation = 90 or 270, A and B are both 0 - hence nothing changes as 0 * x = 0.
For rotation = 180, A and B are both -1. Not sure how this results in 'backwards' pinches, though.

Is there something I need to do to get the ScrollView to work? Or is it a bug?

I thought I have seen apps where you can zoom and rotate with a single gesture- where those views hand coded?

Thanks,
Brian._______________________________________________

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

  • Prev by Date: Re: Dragging from an NSBrowser to an NSTableView
  • Next by Date: Re: Animating handwriting
  • Previous by thread: Re: Animating handwriting
  • Next by thread: about tiling images.
  • Index(es):
    • Date
    • Thread