Re: Autolayout warnings
Re: Autolayout warnings
- Subject: Re: Autolayout warnings
- From: Quincey Morris <email@hidden>
- Date: Wed, 14 Dec 2016 14:40:24 -0800
- Feedback-id: 167118m:167118agrif8a:167118sUyl6ur3kX:SMTPCORP
On Dec 14, 2016, at 14:19 , Doug Hill <email@hidden> wrote:
>
> "<NSLayoutConstraint:0x7f91426a3ef0 'CommentContainerProportionalWidth' UIView:0x7f91426d9db0.width == 0.33*UIView:0x7f91426def30.width>",
> "<NSLayoutConstraint:0x7f91426c91e0 'Hide Comments Constraint' H:[UIView:0x7f91426d7f00]-(0)-[UIView:0x7f91426d9db0]>",
> "<NSLayoutConstraint:0x7f91426e2990 'ShowComments' UIView:0x7f91426d9db0.trailing == UIView:0x7f91426d7f00.trailing>",
> "<NSLayoutConstraint:0x7f91427e43c0 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7f91426def30(768)]>"
It kinda looks like the conflict is between the first and last of these. When you move the comments view off to the trailing edge of what it’s aligned to, you seem to be making the enclosing view wider according to some combination of constraints, which violates the constraint (the last one) saying that the enclosing view is 768 pts wide.
Can you set the comment view to 0 width when you hide it? That would probably eliminate the problem, although a different approach might be preferable. (For example, use conditional constraints on the view that expands to fill the space occupied by the comment view, relative to the enclosing view, and hide the comment view instead of moving it.)
_______________________________________________
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