alt text http://28.media.tumblr.com/tumblr_ky3ezghsar1qzzxzzo1_400.jpg
Can anyone tell me how to achieve such loading message? is it some variation of UIActivityIndicatorView? thanks peter
alt text http://28.media.tumblr.com/tumblr_ky3ezghsar1qzzxzzo1_400.jpg
Can anyone tell me how to achieve such loading message? is it some variation of UIActivityIndicatorView? thanks peter
The spinning wheel is definitely a UIActivityIndicatorView. The "Loading..." text is a UILabel, the rectangle could be an image or could be a UIView with rounded corners (via CALayer). Any questions about the rest of the message? T
If you're looking for existing solutions you may use three20 library - they have implemented this functionality in
TTActivityLabel
class.My way of doing this works much simpler and smooth for me;
Design your loading view in Interface Builder inside your "MainWindow.xib" which is available all through the lifetime of the app (of course if you have one, depending on the type and structure of choice) If you dont have one, just design it inside some view where you can programmatically grab a pointer from your main AppDelegate (use your taste of design choice, but using MainWindow.xib is the easiest)
Then map this view to a variable in your YourApp class which is the infamous app delegate class of yours.
Then, put the following functions in some class and enjoy them
This for showing the loading view just before you run some expensive stuff;
and this to remove it from the callback or whatever it goes when the expensive action is completed;
P.S: And yes I use NULL, true, false instead of nil, YES, NO for obvious reasons...
Hope it helps, Enjoy...
If you wanted a different animation, I created a custom UIView (Loader Animation) to which you could load into a subclass of
UIActivity
.Something similar to the following in your initWithFrame of your custom subclassed UIView:
see this----