gpt4 book ai didi

ios - 警报框上的动画

转载 作者:行者123 更新时间:2023-11-29 01:16:03 25 4
gpt4 key购买 nike

我有一个警告框,想在它“出现”时应用下面的动画:

Scale From 0.94 to 1.0
Opacity From 0 to 1
Time 0.50ms
x1: 0.48, y1: 0.44, x2: 0.01, y2: 1.2

有人可以指导如何快速实现这一目标吗?

代码:

self.view.alpha = 0    
UIView.animateWithDuration(0.05,
animations: { () -> Void in
self.view.alpha = 1.0
},

谢谢。

最佳答案

self.view.frame.origin = CGPoint(x: 0.48, y: 0.44)
self.view.layer.transform = CATransform3DMakeScale(0.94, 0.94, 1)
self.view.alpha = 0




UIView.animateWithDuration(0.05,
animations: { () -> Void in
self.view.layer.transform = CGAffineTransformIdentity
self.view.alpha = 1.0
self.view.frame.origin = CGPoint(x: 0.01, y: 1.2)
self.view.layoutIfNeeded()
})

关于ios - 警报框上的动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35164682/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com