Re: Animating autolayout constraint changes for subviews
Re: Animating autolayout constraint changes for subviews
- Subject: Re: Animating autolayout constraint changes for subviews
- From: Ken Thomases <email@hidden>
- Date: Wed, 28 Dec 2016 14:50:59 -0600
On Dec 28, 2016, at 1:55 PM, Doug Hill <email@hidden> wrote:
>
> I can now animate my constraint changes but I notice that subviews aren't animated. For example, I have a single view with a width constraint, and this view has a label as a subview that expands to the size of it's parent view via edge constraints.
> I can change the width constraint constant of the parent view at runtime and it animates very well. However, the subviews jump into place immediately then the parent view animates into place. I see the same behavior with a button as a subview.
Show exactly how you're animating the constraint changes. Are you really animating the change of the constraint or are you doing a layoutIfNeeded within an animation context? Even if the former, are you calling any methods that force layout (layoutIfNeeded or similar)? If so, where/when?
Regards,
Ken
_______________________________________________
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