Note that there are some explanatory texts on larger screens.

plurals
  1. POAnimating UICircularProgressView
    primarykey
    data
    text
    <p>i am using <a href="https://github.com/Zedenem/UICircularProgressView" rel="nofollow">UICircularProgressView</a> and have changed it to my liking. the initialization is clear but i'll post it anyways:</p> <pre><code>UICircularProgressView *wheelProgress = [[UICircularProgressView alloc]initWithFrame:CGRectMake(someFrame)]; </code></pre> <p>then i am setting the right progress <code>CGFloat between 0-1</code></p> <pre><code>CGFloat progress = .3; // example [self.wheelProgress setProgress:progress]; </code></pre> <p>This works just fine, and looks good, but i would really like to somehow animate it. I havent worked with animations so far, so my first approach was something like</p> <pre><code>for(tempProgress =! progress){ incrementing tempProgress setting tempProgres to progressView } </code></pre> <p>this of course is massively ugly and blocks everything else going on.</p> <p>what i would like to achieve is a linear animation of the progress from 0 to its final value.</p> <p>i have looked at: <a href="http://www.friendlydeveloper.com/2011/02/basic-ui-animation/" rel="nofollow">Animation tutorial</a></p> <p>and came up with something like this:</p> <pre><code>CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration: 1]; wheelProgress.progress = (progress) ? progress : 0.0; [UIView commitAnimations]; </code></pre> <p>but somehow this does not work..</p> <p>any ideas what i need to fix here?</p> <p>thanks in advance sebastian</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload