PDA

View Full Version : URL Loading Indicator




Garrett
Aug 22, 2008, 07:08 PM
I notice with Google Maps, and say MySpace, when they are grabbing info a little spinner displays up in the menu bar. Is this something that you do manually to let the user know something is up? I am using a NSURL method...

I am only asking because I just think maybe I am doing something wrong?



fishkorp
Aug 22, 2008, 08:43 PM
Yes, it is a UIActivityIndicatorView.

Garrett
Aug 22, 2008, 08:54 PM
Yes, it is a UIActivityIndicatorView.
No... did you even read what I asked? In the MENU bar, not a spinning icon. :rolleyes:

robbieduncan
Aug 23, 2008, 03:12 AM
Look at the UIApplication documentation, specifically the networkActivityIndicatorVisible property.

Taum
Aug 23, 2008, 03:23 AM
No... did you even read what I asked? In the MENU bar, not a spinning icon.
What you are refering to is called the Status Bar in the iPhone SDK.

There is nothing called "Menu Bar", so one may easily understand this term as either the Status Bar, the Top Bar of a UINavigationController or even a TabBar.

fishkorp
Aug 23, 2008, 07:15 AM
No... did you even read what I asked? In the MENU bar, not a spinning icon. :rolleyes:

My bad.

My app does that automatically when it is pulling data from a web service, I don't have to do anything special to make it happen :confused:

grimjim
Aug 23, 2008, 08:31 AM
My app does that automatically when it is pulling data from a web service, I don't have to do anything special to make it happen :confused:

That's the networkActivityIndicator for you: always indicating that network activity. :)

It seems to be one of Apple's 'freebies'. It shows automatically when network activity is taking place, and is driven by the system. However, if you don't want the user to see that your app is using the network (Why wouldn't you? I dunno.), you can switch it off using the networkActivityIndicatorVisible: method of UIApplication. But in your case, you seem to be in the happy position of the phone automatically doing what you want!