sergiocg90
sergiocg90

Reputation: 499

How can I change the UIActivityIndicatorView to set a custom image?

Well, I am looking for a way to change my spinner image and use a custom image

Any suggestion?

Upvotes: 3

Views: 11411

Answers (2)

cncool
cncool

Reputation: 1026

I have created a subclass of UIActivityIndicatorView that allows you to set a custom image.

Upvotes: 6

Felix Lamouroux
Felix Lamouroux

Reputation: 7484

You could simply use a UIImageView and add an animation that rotates the view's layer indefinitely. You can achieve this using CoreAnimation. There are plenty of tutorials for this out there.

If you wish to start and stop the animation you can create a simple subclass of UIImageView that adds and removes said animation.

Here's a link for the animation: Basic keyframe animation (rotation)

Upvotes: 2

Related Questions