ios - UIDynamics and Autolayout -
recently used uidynamics animate image view place. however, because autolayout y-pos constraint set off-screen, when navigating away screen , returning it, image view being placed off-screen again. animation took 3 seconds, after 3 seconds reset constraint. feels little hacky.
so question this: proper way handle autolayout , uidynamics @ same time?
this not dynamics problem. autolayout incompatible any view animation, or any manual setting of frame: when layout comes along, constraints obeyed. you, if move view manually in any way, update constraints match new position/size/whatever.
having said that: uikit dynamics, when animation ends, animator pause, , animator's delegate notified:
so moment update constraints.
Comments
Post a Comment