自定义循环进度视图

我search了很多,但无法在互联网上find像这样的控制。 你能帮我做我自己的吗?

http://i.stack.imgur.com/KO9ec.png

以上图中显示的白色圆圈图像,并尝试下面的代码。

- (void)startSpin { if (!animating) { animating = YES; [self spinWithOptions: UIViewAnimationOptionCurveEaseIn]; } } - (void)spinWithOptions:(UIViewAnimationOptions) options { [UIView animateWithDuration: 1.0f delay: 0.0f options: options animations: ^{ imgViewCircle.transform = CGAffineTransformRotate(imgViewCircle.transform, M_PI / 2); } completion: ^(BOOL finished) { if (finished) { if (animating) { // if flag still set, keep spinning with constant speed [self spinWithOptions: UIViewAnimationOptionCurveLinear]; } else if (options != UIViewAnimationOptionCurveEaseOut) { // one last spin, with deceleration [self spinWithOptions: UIViewAnimationOptionCurveEaseOut]; } } }]; }