Regarding "didFailWithError
" and "connectionDidFinishLoading
"
Can they both be called? Or its always one or the other?
No, they cannot be called at the same time.
After the delegate receives a message connection:didFailWithError:
, it receives no further delegate messages for the specified connection.
If the connection succeeds in downloading the request, the delegate receives the connectionDidFinishLoading:
message. The delegate will receive no further messages for the connection and the NSURLConnection
object can be released.