How to use activity indicator view on iPhone?

后端 未结 8 1160
太阳男子
太阳男子 2020-11-29 16:14

An activity indicator view is useful in many applications. Any ideas about how to add, activiate and dismiss an activity indicator view on iPhone?

All the methods fo

8条回答
  •  天命终不由人
    2020-11-29 16:48

    Take a look at the open source WordPress application. They have a very re-usable window they have created for displaying an "activity in progress" type display over top of whatever view your application is currently displaying.

    http://iphone.trac.wordpress.org/browser/trunk

    The files you want are:

    • WPActivityIndicator.xib
    • RoundedRectBlack.png
    • WPActivityIndicator.h
    • WPActivityIndicator.m

    Then to show it use something like:

    [[WPActivityIndicator sharedActivityIndicator] show];
    

    And hide with:

    [[WPActivityIndicator sharedActivityIndicator] hide];
    

提交回复
热议问题