Re: Quickie about constraints
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