Reputation: 1309
I own an image as ci-below attached!
I would like to make a loader that loading be representing this animation (ci-below)!
I have a small idea of the code that I use for this but hmmm, I'd like your opinion on the matter and if possible differente ideas on how to implement it!
Quick concept code :
[UIView animateWithDuration:1.0f delay:0.0f options: UIViewAnimationCurveLinear animations:^(void) {
//rotate half way (use 179.9 for direction, -179.9 is left)
self.refreshButton.transform = CGAffineTransformRotate(self.refreshButton.transform,179.9*M_PI/180);
} completion:^(BOOL finished) {
//still loading? rotate half again
if ([self.superAwesomeWebView isLoading]) {
[self animateLoadButton];
}
}];
Upvotes: 0
Views: 814
Reputation: 3954
This should do the trick (requires ARC):
https://www.cocoacontrols.com/controls/dacircularprogress
Upvotes: 1