Reputation: 1814
I want to implement animation like This link while application interact with server.
If someone has example to implement this kind of animation then please provide me link.
Upvotes: 0
Views: 160
Reputation: 2869
interaction designer at Creativedash here =]
For something like that you'd make a png sequence, and set the animationImages
property of a UIImageView. iOS is great at animating png sequences.
When your load starts, do yourLoadingImage.startAnimating()
and when it's over (in the completion for your request), call yourLoadingImage.stopAnimating()
.
There's a property called animationDuration
, and you need to set that as well, just to indicate how long the animation loop is - this doesn't indicate how long the animation will play for. It loops until you tell it to stop.
yourLoadingImage.animationDuration = 1 //set the loop duration to 1s
We actually did a short blog post on this process, and it can be the same for really any custom loader. http://news.ui8.net/create-a-custom-animated-loading-indicator-with-swift/
Upvotes: 2
Reputation: 883
If you want that specific one I think you are going to have to make it yourself, but if you don't here are some open source alternatives.
Upvotes: 2