NSData initWithContentsOfURL: options: errorPtr: delegate object?
-
12-09-2019 - |
Question
Is there a way to assign some sort of delegate object when
[[NSData alloc] initWithContentsOfUrl:... options:... errorPtr:...]
is called so that I can monitor percentage complete of a download or is the best way to handle this sort of thing through the use of the asynchronous NSURLConnection stuff?
Solution
NSData initWithContentsOfUrl
is a synchronized call that is not meant to provide progress info. You should use NSURLConnection
asynchronized call instead.
If you want to animate a UIProgressView
, you should consider using ASIHTTTPRequest
library. It's a very neat library.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow