views:

440

answers:

3

Hi,

How can I display the loading screen animation in iphone? I mean the bars arranged in circles. So that I can use it while some of the part of my app is loading, like initializing. Or should I create may own animation loading?

Thanks.

+4  A: 

That's a class called UIActivityIndicatorView. You can either instantiate it as you would any other view in your code or you can drop it into a nib with Interface Builder.

Danilo Campos
Thanks! Just a question, does the animation in UIActivityIndicatorView will affect the frame rate or speed of the app?
sasayins
It never has in my experience -- feels pretty light weight. As long as you're not using several of them at once, incurring heavy compositing costs, you should be just fine.
Danilo Campos
Wow great! Good to hear that answer. Thanks a lot again. =)
sasayins
+1  A: 

The widget is called UIActivityIndicatorView.

Alex Reynolds
Thanks for the answer. Reading the document right now. :)
sasayins
+1  A: 

Here is a good example of creating a loading view while waiting for something to happen http://cocoawithlove.com/2009/04/showing-message-over-iphone-keyboard.html

John Stallings
Thanks. That is very helpful.
sasayins