• 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: Supporting rotation and zoom gestures with autolayout?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Supporting rotation and zoom gestures with autolayout?


  • Subject: Re: Supporting rotation and zoom gestures with autolayout?
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 13 Jun 2013 14:30:24 -0700

On Thu, Jun 13, 2013, at 02:15 PM, Rick Mann wrote:
>
> On Jun 13, 2013, at 14:13 , Kyle Sluder <email@hidden> wrote:
>
> > During pinching and zooming, remove all constraints involving the view,
> > turn on translatesAutoresizingMaskIntoConstraints for that view, and
> > directly manipulate its bounds and rotation. Reinstall the constraints
> > when you're done.
>
> Wow, really? That seems heavy-handed. I thought autolayout was supposed
> to (eventually) replace the autoresizing mask.

Neither autoresizing masks nor autolayout constraints are appropriate
for describing the behavior you're trying to implement, which is tied
directly to user input. Plus, it involves rotation, which auto layout
definitely doesn't understand.

So theoretically, you shouldn't need to turn on
translatesAutoresizingMaskIntoConstraints for the view. In fact, it's
possible that you don't have to on iOS.

The reason I suggested turning it on is because at least on OS X, a view
contained within a constraints-based window that doesn't have any
constraints installed on it will misbehave. Specifically, when the view
lays out it will resize all dimensions of the view to zero. (r.12466034)

>
> When you say "that view," it brings up another question. Is it enough for
> me to put a UIImageView inside a UIScrollView, or do I need another view
> in between them. Given that, for which view should I do what you suggest?
> The UIImageView inside, the UIScrollView (or the intermediate view, if
> that's necessary)?

I don't work on iOS stuff enough to have a good answer for you here.

--Kyle Sluder
_______________________________________________

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: Supporting rotation and zoom gestures with autolayout?
      • From: Rick Mann <email@hidden>
References: 
 >Supporting rotation and zoom gestures with autolayout? (From: Rick Mann <email@hidden>)
 >Re: Supporting rotation and zoom gestures with autolayout? (From: Kyle Sluder <email@hidden>)
 >Re: Supporting rotation and zoom gestures with autolayout? (From: Rick Mann <email@hidden>)

  • Prev by Date: Asynchronously mounting a remote file server?
  • Next by Date: Re: Supporting rotation and zoom gestures with autolayout?
  • Previous by thread: Re: Supporting rotation and zoom gestures with autolayout?
  • Next by thread: Re: Supporting rotation and zoom gestures with autolayout?
  • Index(es):
    • Date
    • Thread