• 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: Quickie about constraints
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quickie about constraints


  • Subject: Re: Quickie about constraints
  • From: Ben Kennedy <email@hidden>
  • Date: Mon, 18 Aug 2014 14:02:24 -0700

Thank you Charles and Roland for pointing out that section of documentation, and correcting in detail my mis-advice in the first reply.  Going back to what Kyle replied to me originally:

>> Can't you simply set translatesAutoresizingMaskIntoConstraints = NO on the views in question?  Then you should be free to manipulate such views' frames at will without interfering in any related constraints.
>
> Not sure if you’ve got this backwards, or are unaware of a certain frameworks bug.
>
> Views whose translatesAutoresizingMaskIntoConstraints property is set to YES can be positioned via -setFrame:. Views whose property is set to NO must be positioned via constraints.

Indeed I stated it exactly backwards, having confused myself for the same reason Graham pointed out with regard to the property's naming.  I was thinking that in such a case the reason setFrame: worked was precisely because the view didn't participate in auto-layout, rather than the opposite (the frame/mask being translated on an ongoing basis, not simply once at init time.)

b


_______________________________________________

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


References: 
 >Quickie about constraints (From: Graham Cox <email@hidden>)
 >Re: Quickie about constraints (From: Jonathan Mitchell <email@hidden>)
 >Re: Quickie about constraints (From: Graham Cox <email@hidden>)
 >Re: Quickie about constraints (From: Ben Kennedy <email@hidden>)
 >Re: Quickie about constraints (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSPageLayout obsolete?
  • Next by Date: Re: NSPageLayout obsolete?
  • Previous by thread: Re: Quickie about constraints
  • Next by thread: NSPopupButton, bindings, and item state
  • Index(es):
    • Date
    • Thread