繁体   English   中英

UIView animation 不工作 - Xcode (Swift)

[英]UIView animation not working - Xcode (Swift)

示例:我没有看到任何 animation。 为什么?

UIView.animate(withDuration: 1, delay: 0, options: [.repeat, .autoreverse], animations: {
    self.buttonTrial.transform = CGAffineTransform(scaleX: 1.2, y: 1.2)
}, completion: { completion in
    self.buttonTrial.transform = .identity
})

您的代码工作正常。 我删除了completion ,因为它不需要,但除此之外,这是完全使用您显示的代码完成的。

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM