Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress does not follow interval #85

Open
daweedm opened this issue Sep 29, 2015 · 0 comments
Open

Progress does not follow interval #85

daweedm opened this issue Sep 29, 2015 · 0 comments

Comments

@daweedm
Copy link

daweedm commented Sep 29, 2015

Hello,

I have a problem with the "image progress"

I want the progress to follow the speed of the interval. I update also an UILabel, that updates at good speed according to the interval, but the image progress doesn't : it simply animate at fixed speed after a short delay ...

Here is my code :

override func viewWillAppear(animated: Bool) {
              updateTimer = NSTimer.scheduledTimerWithTimeInterval(0.01, target: self, selector: "upProgress", userInfo: nil, repeats: true)
              super.viewWillAppear(animated)

    }
func upProgress() {
        dispatch_async(dispatch_get_main_queue(), {
            self.iconProgress.setProgress(CGFloat(++self.counterProgress) / CGFloat(100), animated: true)
            self.progressLabel.text = String(self.counterProgress) + "%"
            if(self.counterProgress == 100) {
                self.updateTimer.invalidate()
            }
        })
    }

Can anyone help me to fix this ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants