久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

不推薦使用 iOS5 NSURLConnection 方法

iOS5 NSURLConnection methods deprecated(不推薦使用 iOS5 NSURLConnection 方法)
本文介紹了不推薦使用 iOS5 NSURLConnection 方法的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我正在嘗試編寫一個 iOS 應用程序,它發出異步請求以通過網絡獲取數據.似乎很多人為此推薦使用 NSURLConnection,并且經常提到委托方法 connection:didReceiveData:.

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 frequently mention the delegate method connection:didReceiveData:.

不幸的是,我終生無法找到此委托方法的文檔記錄.一方面,它不在 NSURLConnectionDelegate 的協議參考.它列在 NSURLConnection 類參考,但顯然在 iOS5 中已被棄用.該文檔沒有解釋為什么它被棄用,或者開發人員應該使用什么來實現類似的功能.

Unfortunately, I cannot for the life of me find out where this delegate method is documented. For one, it is not in the protocol reference for NSURLConnectionDelegate. It is listed in the NSURLConnection Class Reference, but has apparently been deprecated as of iOS5. The documentation does not explain why it was deprecated, or what developers should use instead to achieve similar functionality.

我錯過了什么?我讀過的很多內容似乎暗示了對 iOS5 的 NSURLConnection 進行了重大更改.這些更改記錄在哪里?委托方法的文檔是否完整?

What am I missing? A lot of what I've read seems to imply that big changes were made to NSURLConnection for iOS5. Where are these changes documented? Is the documentation of delegate methods complete?

謝謝

推薦答案

搜索頭文件告訴我,這些方法已從非正式協議(這是一種已棄用的 Obj-C 模式)轉移到名為 NSURLConnectionDataDelegate 位于 NSURLConnection.h 中,但沒有公共文檔.

Fishing around the header files tells me that the methods were moved from an informal protocol (which is a deprecated Obj-C pattern) into a formal delegate protocol called NSURLConnectionDataDelegate that's in NSURLConnection.h, but doesn't have a public documentation.

文檔的其余部分繼續使用以前的方法,所以我猜這是文檔中的一個遺漏.IE.這些方法(大部分)不會去任何地方,它們只是被改組為幾個協議,文檔團隊一直在懈怠.嘗試使您的委托對象符合適當的協議,并使用頭文件中的簽名實現方法.

The rest of the documentation keeps using the methods as before, so my guess is this is an omission in the documentation. I.e. the methods (mostly) aren't going anywhere, they were just reshuffled into several protocols and the documentation team has been slacking off. Try making your delegate object conform to the appropriate protocol, and implement the methods with the signatures from the header file.

這篇關于不推薦使用 iOS5 NSURLConnection 方法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
Send backspace key event to edit text(發送退格鍵事件以編輯文本)
Android: How to set password property in an edit text?(Android:如何在編輯文本中設置密碼屬性?)
Label in a editbox in android(在android的編輯框中添加標簽)
actionDone imeOption doesn#39;t work on EditText in Android 2.3(actionDone imeOption 不適用于 Android 2.3 中的 EditText)
主站蜘蛛池模板: 国产成人av一区二区三区 | 亚洲女优在线播放 | 成人免费一区二区三区视频网站 | 亚洲三区在线观看 | 精品一区国产 | 久久丁香 | 国产精品久久久久久久久久久久午夜片 | 国产一级片一区二区 | 成人伊人| 久久精品日产第一区二区三区 | av中文字幕在线观看 | 免费一级淫片aaa片毛片a级 | 欧美精品一区二区三区四区五区 | 久久久av | www.国产91| www.亚洲视频 | 成人在线视频免费观看 | 在线成人免费视频 | 久久久久久久久久久成人 | 搞av.com | 网站国产| 日本在线视频中文字幕 | 亚洲日韩中文字幕 | 日韩毛片播放 | 日韩精品一区二区三区中文字幕 | 少妇久久久 | 国产传媒在线播放 | www国产精品| 成人午夜视频在线观看 | 国产精品一区二区不卡 | 久久www免费人成看片高清 | 欧美国产日韩在线 | 国产精品久久久久久久久久久久午夜片 | 99久久婷婷国产综合精品电影 | 精品二区 | 亚洲人人舔人人 | 欧美精品一区二区免费 | 91在线视频 | 婷婷中文字幕 | www精品美女久久久tv | 黄视频网址 |