swift - How to animate a simple movement UIKit -
i trying animate uiimageview moves down on screen, can't figure out how code or organize new swift. use imageview called mrock. . want move down in straight line.
would use like
blank.movetopoint
and coordinates don't know.
as greg says in answer, uiview methods who's names start animatewithduration start.
if you're using autolayout, however, animating view's center or frame property doesn't operate expected, since constraints can take on , move views layout-based positions.
with auto-layout, instead should create 1 or more position constraints on view in ib, control-drag constraints view controller create outlets.
then change constraint's constant setting , call layoutifneeded inside animation block.
Comments
Post a Comment