As described in the title, I wanted to change a double variable (a property of the class) from to 0.0 to 1.0. Because I wanted achieve an animation effect with the DACircularProgressView, and I wrote the code for it:
func showProgressView() {
progressView = DACircularProgressView(frame: CGRectMake(UIScreen.mainScreen().bounds.width - 60, 20, 40, 40))
if let progressView = progressView {
progressView.progress = 0
addSubview(progressView)
UIView.animateWithDuration(3, animations: {
progressView.progress = 1
}, completion: { (finish: Bool) in
})
}
}
First I think the animate
can make a variable gradually increase as the alpha
property. As a result, I can't get it. So, seek help.
Thx.