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

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -