WWBankBalanceAnimationLabel

main

UILabel text animation.
William-Weng/WWBankBalanceAnimationLabel

WWBankBalanceAnimationLabel

Swift-5.6 iOS-14.0 TAG Swift Package Manager-SUCCESS LICENSE

  • UILabel text animation.
  • UILabel文字動畫.

WWBankBalanceAnimationLabel

dependencies: [
    .package(url: "https://github.com/William-Weng/WWBankBalanceAnimationLabel.git", .upToNextMajor(from: "1.0.0"))
]

可用函式

函式 說明
balance(from:to:duration:fps:format:runloop:forMode:progress:completion:) 執行數字動畫

Example

import UIKit
import WWPrint
import WWBankBalanceAnimationLabel

final class ViewController: UIViewController {
    
    @IBOutlet weak var label1: WWBankBalanceAnimationLabel!
    @IBOutlet weak var label2: WWBankBalanceAnimationLabel!
    @IBOutlet weak var label3: WWBankBalanceAnimationLabel!
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    @IBAction func running(_ sender: UIBarButtonItem) {
        
        label1.balance(from: 0, to: 100_000_000, format: "TWD. %.0f") { value in
            wwPrint(value)
        } completion: { isCompletion in
            wwPrint(isCompletion)
        }
        
        label2.balance(to: 123456.56789, duration: 3.0, format: "CNY. %.5f", runloop: .current, forMode: .common)
        
        label3.balance(to: 200_000_000, duration: 5.0, fps: 5, format: "USD. %.1f")
    }
}

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Oct 18 2024 16:36:48 GMT-0900 (Hawaii-Aleutian Daylight Time)