iOS 动画化UIView
本文向大家介绍iOS 动画化UIView,包括了iOS 动画化UIView的使用技巧和注意事项,需要的朋友参考一下
示例
let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) view.backgroundColor = UIColor.orange self.view.addSubview(view) UIView.animate(withDuration: 0.75, delay: 0.5, options: .curveEaseIn, animations: { //这将导致视图从(0,0)转到 // (self.view.frame.origin.x,self.view.frame.origin.y) view.frame.origin.x = self.view.frame.origin.x view.frame.origin.y = self.view.frame.origin.y }) { (finished) in view.backgroundColor= UIColor.blueColor() }