i am using apple’s sample URLCache,but when i mention url, it loads data perfectly
but i want to calculate time of downloading(till completion),is there anyh built in method?
i am using apple’s sample URLCache ,but when i mention url, it loads data
Share
Add NSDate property to your class, name it,let’s say, downloadStart and when download starts, save actual time to it – self.downloadStart = [NSDate date];
Then in -connectionDidFinishLoading: delegate method implementation do:
That’s it. Please note that the code above is just a kind of abstract how to do the trick, so don’t use in copy & paste manner.