Creating a custom UIActivityIndicatorView

2019-01-14 14:54发布

问题:

I want to have a custom view for UIActivityIndicatorView rather than relying on options given by iOS. How can I create my own view here?

I have a list of images with me to create a animated view.

回答1:

As you haven't specified the case in which you want to use the activity indicator,

check the below tutorial blog for custom UIActivityIndicatorView,

Custom UIActivityIndicatorView (EDIT: This link is gone)

Showing a "Loading..." message over the iPhone keyboard



回答2:

This is implementation of custom UIActivityIndicator from scratch ready for integrating.



回答3:

Abhinav, if you want to use a set of images you could as well use a UIImageView. Set the animationImages and start-stop as you wish.



回答4:

This one looks nice and clean, can be hooked to the code easily too.