how can i make complete data when using NSURLConnection?
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
}
paste parts of NSData?
What should i do clearly i want to download a file from url address to my document directory and i want to know how many bytes has been downloaded to complete what is the best way?
Create a NSMutableData and append it when you receive the data.
Or
Then deal with that data in
connectionDidFinishLoadingRemember to release the data and connection once you finish it.
For more detail you may refer to this document: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html