Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

naximus

macrumors newbie
Original poster
Oct 3, 2008
3
0
Hi. Anyone knows how to get the spinner cursor to show-up in the status bar when app is busy? I tried a quick search on forum but no luck.


If you don't know how to do the above then how would you pop message box telling user app is busy doing while showing the spinning cursor along side?


Thanks in advance.
 
Hi. Anyone knows how to get the spinner cursor to show-up in the status bar when app is busy? I tried a quick search on forum but no luck.


If you don't know how to do the above then how would you pop message box telling user app is busy doing while showing the spinning cursor along side?


Thanks in advance.

That spinner is displayed only when there is data being exchanged over a network. There is no other way to turn this activity indicator.
 
That spinner is displayed only when there is data being exchanged over a network. There is no other way to turn this activity indicator.

That's not exactly true

Code:
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
 
That's not exactly true

Code:
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];

Uuu, I stand corrected. Thanks :)
 
It has been brought up that apple will deny any apps to the app store that uses that indicator for anything other that network activity.

just a heads up.
 
It has been brought up that apple will deny any apps to the app store that uses that indicator for anything other that network activity.

just a heads up.

Yeah, you do have to turn it on and yourself, but as a convention you should only do so to indicate network activity os happening. After all, it is the network activity indicator.
 
An Apple rep told me that a lot of apps are using it as a "busy" indicator instead of adding/animating a activityIndicator in their app. Your right the phone knows when it is Trans/Recv it should be automatic.
 
It seemed to me that when I enabled the network activity indicator it just kept spinning even when my app was doing no networking. Is that what others are seeing? It's of no use to me if it's always spinning.

Obviously I can't tell if some background app is using the network but it just kept spinning.

Is the idea that your app should turn it on and off to indicate network activity? I guess that might work.
 
if your started it spinning you also have to stop it.
Code:
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
i did this too and fought for hours looking thru my horribly organized code till i found that i started it but did not stop it after my net activity was finished
:)

Jason
 
OK, so it's no different than the regular spinning activity indicator just that its in the status bar. I didn't get that from reading the docs. I assumed it was detecting the network activity itself.

Makes sense, sort of.
 
Thanks

Thanks a lot guys for the discussion already...

My real problem is that when my app loads up, its taking lots of time to actually show up. I know however that any work I do on the startup takes very little time in fact.

I was thinking of using this spinning cursor within the status bar but after reading your writings I will not be.

I need to at least be able to show something, other than a blank black screen but am just not sure how.....My app looks dead when it loads up for a good 6-8 seconds...

My app use a small database and few images...i know that its at least 5 seconds in the loading process that my app actually begins loading data so I can't account for at least 5-6 seconds of this black screen on startup...

any idea?
 
Read up on using a Default.png file.

The iPhone OS takes its time setting up the app sandbox and loading your code and maybe xibs into memory before any of your initialization code gets called, but the Default.png can be displayed while this is going on. So display something (splash screen or dummy app view) that keeps the user's attention while waiting.


.
 
If you run your app with ObjectAlloc (start with performance tool menu item) you should be able to get a clue about what's happing during your app startup. It shows a timeline of all the memory allocations and you can see the stack trace where the allocations were made.
 
Read up on using a Default.png file.

The iPhone OS takes its time setting up the app sandbox and loading your code and maybe xibs into memory before any of your initialization code gets called, but the Default.png can be displayed while this is going on. So display something (splash screen or dummy app view) that keeps the user's attention while waiting.


.

Thanks a lot..that did it for now..something so simple but wasted so much time on....thanks again.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.