I want to read the background WebService SOAP method of data encapsulated in a class, but it sends a connection request and read data is asynchronous operation, but can also be read in several steps, only the execution to - (void) connctionDidFinishLoading: (NSURLConnection *) connection only indicates that the data has been read, then I know how in the main thread finished reading the data of it?
Thank you prawn, I am a novice. Preferably with sample code.
Reply:
Several options:
An agent
In the - (void) connctionDidFinishLoading: (NSURLConnection *) connection method in
[Delegate doSomting: data to be transmitted];
2 Notification
The place where you want to receive data register for notifications, in - (void) connctionDidFinishLoading: (NSURLConnection *) connection method in [[NSNotificationCenter defaultCenter] postNotificationName: xxxxx object: data to be transmitted];
3. . .
Reply:
Network requests into a separate thread, until after the end of the data requested by the commission notify the main thread.
No comments:
Post a Comment