iOS 蹺蹺板動畫 Seesaw Animation
Xcode Playgound示例代碼:
let testView = UIView() testView.frame = CGRect.init(x: 100, y: 100, width: 200, height: 200) self.view.addSubview(testView) testView.backgroundColor = UIColor.red var trans = CATransform3DIdentity trans.m34 = -1.0 / 500 trans = CATransform3DRotate(trans, CGFloat.pi / 3, 1, 0, 0) UIView.animate(withDuration: 1, animations: { testView.layer.transform = trans }) { (finish) in UIView.animate(withDuration: 1, animations: { testView.layer.transform = CATransform3DIdentity }) }
Ficow原創(chuàng),轉(zhuǎn)載請注明出處:http://www.rzrgm.cn/ficow/p/8227709.html
Stay hungry,stay foolish.

浙公網(wǎng)安備 33010602011771號