ios - how i can add animation to any UI by snapkit by swift 3? -
label.snp.makeconstraints { (make) -> void in make.width.equalto(box).dividedby(2) make.top.equalto(100) make.left.greaterthanorequalto(box.snp.left).offset(15) } i want animate label position button
after update constraints call layoutifneeded() on view in animation closure.
uiview.animatewithduration(0.2, delay: 0, options: [], animations: { () -> void in self.view.layoutifneeded() }) hope helps.
Comments
Post a Comment