mirror of https://github.com/xaoxuu/ProHUD
update
This commit is contained in:
parent
4217c5a98c
commit
51c08fb064
|
@ -148,8 +148,10 @@ public extension Alert {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func animate(rotate: Bool) {
|
/// 图片旋转效果
|
||||||
if rotate {
|
/// - Parameter flag: 是否开启
|
||||||
|
func rotate(_ flag: Bool = true) {
|
||||||
|
if flag {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let ani = CABasicAnimation(keyPath: "transform.rotation.z")
|
let ani = CABasicAnimation(keyPath: "transform.rotation.z")
|
||||||
ani.toValue = Double.pi * 2.0
|
ani.toValue = Double.pi * 2.0
|
||||||
|
|
|
@ -174,9 +174,9 @@ public extension Toast {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 图片旋转效果
|
/// 图片旋转效果
|
||||||
/// - Parameter rotate: 是否开启
|
/// - Parameter flag: 是否开启
|
||||||
func animate(rotate: Bool) {
|
func rotate(_ flag: Bool = true) {
|
||||||
if rotate {
|
if flag {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let ani = CABasicAnimation(keyPath: "transform.rotation.z")
|
let ani = CABasicAnimation(keyPath: "transform.rotation.z")
|
||||||
ani.toValue = Double.pi * 2.0
|
ani.toValue = Double.pi * 2.0
|
||||||
|
|
Loading…
Reference in New Issue