动画

2018-09-25  本文已影响7人  _弓长_大人
r view in myViews {
            UIView.transition(with: self.view, duration: 3.0, options: .allowAnimatedContent,
                animations: {
                                
                let new_xpoint = Int(arc4random() % UInt32(self.view.frame.size.width))
                let new_ypoint = Int(arc4random() % UInt32(self.view.frame.size.height))
                                
                view.center = CGPoint(x: new_xpoint, y: new_ypoint)
                
            },
                completion: nil)
        }
上一篇 下一篇

猜你喜欢

热点阅读