Re: Autolayout warnings

2016-12-14 Thread Gary L. Wade
In case it helps with your future animatable design, my particular app has a layout kind of like this: —— | | (8 points separation)Title (could be long) | | (8 points separation)Subtitle (could be long) —— and I used something like this in viewDidLoad to preserve the values before I ha

Re: Autolayout warnings

2016-12-14 Thread Doug Hill
Great, more good stuff to know! However, trying this out I see that some views animate and others don't (just jump into place). I guess I'll look into a more animatable design. Doug Hill > On Dec 14, 2016, at 3:24 PM, Ken Thomases wrote: > > On Dec 14, 2016, at 5:15 PM, Doug Hill wrote: >>

Re: Autolayout warnings

2016-12-14 Thread Ken Thomases
On Dec 14, 2016, at 5:15 PM, Doug Hill wrote: > > Ok, this is more good information to keep in mind when designing autolayout > constraints. Given that my design isn't animatable, it's back to the > autolayout drawing board. Again. I think it works to animate a change of constraints if you do

Re: Autolayout warnings

2016-12-14 Thread Doug Hill
Ok, this is more good information to keep in mind when designing autolayout constraints. Given that my design isn't animatable, it's back to the autolayout drawing board. Again. Doug Hill > On Dec 14, 2016, at 3:07 PM, Gary L. Wade > wrote: > > Right, activate and deactivate are not animata

Re: Autolayout warnings

2016-12-14 Thread Gary L. Wade
Right, activate and deactivate are not animatable, but the constant values in constraints are. True, it depends on what you’re showing as to whether to shrink or move your view. When I wanted to use a search bar in UISearchController with a collection view in iOS to appear similarly as UITable

Re: Autolayout warnings

2016-12-14 Thread Doug Hill
Gary, Thanks for the reply. I tried moving the container rather than resizing to 0 because there's a table inside this view and it will relayout when resizing. For an animation, I guess it depends on what effect you want: either seeing the view move or resize to 0. Oddly, when I put my code to

Re: Autolayout warnings

2016-12-14 Thread Doug Hill
> On Dec 14, 2016, at 2:46 PM, Ken Thomases wrote: > > On Dec 14, 2016, at 4:19 PM, Doug Hill wrote: >> >> I'm seeing warnings in the console when I dynamically make autolayout >> constraints active/inactive at runtime. >> >> I have two constraints that align a container view leading or trai

Re: Autolayout warnings

2016-12-14 Thread Gary L. Wade
If I understand you correctly, you might prefer the approach I chose to do. Rather than activating and deactivating constraints (BTW, you should always deactivate before having multiple actives), set your constraints up to always be active but change the width for the one you’re hiding to 0 and

Re: Autolayout warnings

2016-12-14 Thread Doug Hill
Quincey, Thanks for the reply. > On Dec 14, 2016, at 2:40 PM, Quincey Morris > wrote: > > On Dec 14, 2016, at 14:19 , Doug Hill > wrote: >> >>"> UIView:0x7f91426d9db0.width == 0.33*UIView:0x7f91426def30.width>", >>"> H:[UIView:0x7f91426d7f00]-(0)-[UIView:0

Re: Autolayout warnings

2016-12-14 Thread Ken Thomases
On Dec 14, 2016, at 4:19 PM, Doug Hill wrote: > > I'm seeing warnings in the console when I dynamically make autolayout > constraints active/inactive at runtime. > > I have two constraints that align a container view leading or trailing edge > with another view's edge. This is to move the cont

Re: Autolayout warnings

2016-12-14 Thread Quincey Morris
On Dec 14, 2016, at 14:19 , Doug Hill wrote: > >" UIView:0x7f91426d9db0.width == 0.33*UIView:0x7f91426def30.width>", >" H:[UIView:0x7f91426d7f00]-(0)-[UIView:0x7f91426d9db0]>", >" UIView:0x7f91426d9db0.trailing == UIView:0x7f91426d7f00.trailing>", >" H:[UIView:0x7f91426def30(768)]

Autolayout warnings

2016-12-14 Thread Doug Hill
I'm seeing warnings in the console when I dynamically make autolayout constraints active/inactive at runtime. I have two constraints that align a container view leading or trailing edge with another view's edge. This is to move the container onscreen or offscreen. I have another view whose trai