Indicador de actividad de la red cuando la aplicación pasa del estado suspendido al estado activo (iOS)

I have an iPhone app that in some situations, must get some data from the internet when it becomes active. As it takes several seconds, I would like the user to see an activity indicator and not only the screenshot the system saved when the app went background state.

¿Es posible? ¿Cómo?

Muchas gracias,

Carlos

preguntado el 10 de marzo de 12 a las 13:03

I'm getting the data from the internet in applicationDidBecomeActive -

1 Respuestas

You can use UIApplication's networkActivityIndicatorVisible on the applicationWillEnterForeground method to show the status bar indicator.

respondido 10 mar '12, 13:03

It doesn't work. The indicator appears when the app got the data from the internet. Not while it's getting it... Obrigado! - Carlos

Try starting a background task. Search the docs for it. De nada! - fbernardo

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.