Skip to content

Maybe enable animating the changing of the label value? #34

@acosmicflamingo

Description

@acosmicflamingo

Great work with this project! I'm integrating it to my app right now and am making a change to it that will suit my needs, and I think you'd like it too :)

Instead of just instantaneously changing the label value, how about you add something like this?

private func updateProgressLabelText() {
    UIView.transition(with: progressLabel, duration: 0.8, options: .transitionCrossDissolve, animations: { [weak self] in
        if let currentSelf = self {
            currentSelf.progressLabel.text = "\(Int(round(currentSelf._progress * 100)))%"
        }
    }, completion: nil)
}

I don't know, maybe you thought of it already. Wouldn't hurt to share my findings! Take care and once again, great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions