This commit is contained in:
xaoxuu 2019-08-13 10:02:38 +08:00
parent 4217c5a98c
commit 51c08fb064
2 changed files with 7 additions and 5 deletions

View File

@ -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 {
let ani = CABasicAnimation(keyPath: "transform.rotation.z")
ani.toValue = Double.pi * 2.0

View File

@ -174,9 +174,9 @@ public extension Toast {
}
///
/// - Parameter rotate:
func animate(rotate: Bool) {
if rotate {
/// - Parameter flag:
func rotate(_ flag: Bool = true) {
if flag {
DispatchQueue.main.async {
let ani = CABasicAnimation(keyPath: "transform.rotation.z")
ani.toValue = Double.pi * 2.0