CodeCallTracker

1.0.0

CodeCallTracker facilitates executing code exclusively on its first call
Adobels/CodeCallTracker

What's New

Initial Release

2025-09-04T12:18:44Z

CodeCallTracker

CodeCallTracker facilitates executing code exclusively on its first call

example:

class ViewController: UIViewController {

    private let code = CodeCallTracker()

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated: animated)
        if code.isFirstTimeCall() {
            // do something only on first call of viewWillAppear
        } else {
            // do something on other calls of viewWillAppear
        }
    }
    
    override func updateViewConstraints() {
        if code.isFirstTimeCall() {
            // do something only on first call of updateViewConstraints
        } else {
            // do something on other calls of updateViewConstraints
        }
        super.updateViewConstraints()
    }
}

Description

  • Swift Tools 5.10.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Sep 07 2025 06:20:20 GMT-0900 (Hawaii-Aleutian Daylight Time)