iOS5 NSURLConnection methods deprecated

后端 未结 4 1904
悲&欢浪女
悲&欢浪女 2020-12-04 18:48

I\'m trying to write an iOS app that makes asynchronous requests to get data over the network. It seems like a lot of people recommend using NSURLConnection for this, and fr

4条回答
  •  青春惊慌失措
    2020-12-04 19:41

    You would think deprecating those methods from NSURLConnection would warrant some kind of explainer, but I have not yet found one. The best I could do so far is from Apple's URL Loading System Programming Guide:

    In order to download the contents of a URL, an application needs to provide a delegate object that, at a minimum, implements the following delegate methods: connection:didReceiveResponse:, connection:didReceiveData:, connection:didFailWithError: and connectionDidFinishLoading:

    which implies an informal protocol.

提交回复
热议问题