how can we know iphone has got information from Internet? -
When I search from the internet, I want to display the activity indicator. But how can I know that the Internet to the iPhone Get feedback from the animating activity pointer to stop? Is there any way?
Take a look at the representative methods, especially, the connection: receipt response:
and connectionDidFinish Loading:
Under the connection: didReiveiveResponse:
Representative method that you can display Like the Network Activity Indicator:
- (zero) connection: (NSURLConnection *) connection did the reception response: (NSURLResponse *) response [[UIApplication shared application] .networkActivityIndicatorVisible = YE S; // ...}
and then hide it in the connection: DidFinish is loading:
- ( Zero) connectionDidFinish Loading: (NSURLConnection *) Connection [[UIApplication shared application] .networkActivityIndicatorVisible = NO; // ...}
You should also hide it in the connection: didFailWithError:
Your connection attempt must be unsuccessful.
Comments
Post a Comment