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

不推薦使用 iOS5 NSURLConnection 方法

iOS5 NSURLConnection methods deprecated(不推薦使用 iOS5 NSURLConnection 方法)
本文介紹了不推薦使用 iOS5 NSURLConnection 方法的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

我正在嘗試編寫一個(gè) iOS 應(yīng)用程序,它發(fā)出異步請(qǐng)求以通過(guò)網(wǎng)絡(luò)獲取數(shù)據(jù).似乎很多人為此推薦使用 NSURLConnection,并且經(jīng)常提到委托方法 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:.

不幸的是,我終生無(wú)法找到此委托方法的文檔記錄.一方面,它不在 NSURLConnectionDelegate 的協(xié)議參考.它列在 NSURLConnection 類參考,但顯然在 iOS5 中已被棄用.該文檔沒(méi)有解釋為什么它被棄用,或者開(kāi)發(fā)人員應(yīng)該使用什么來(lái)實(shí)現(xiàn)類似的功能.

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.

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

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?

謝謝

推薦答案

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

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.

文檔的其余部分繼續(xù)使用以前的方法,所以我猜這是文檔中的一個(gè)遺漏.IE.這些方法(大部分)不會(huì)去任何地方,它們只是被改組為幾個(gè)協(xié)議,文檔團(tuán)隊(duì)一直在懈怠.嘗試使您的委托對(duì)象符合適當(dāng)?shù)膮f(xié)議,并使用頭文件中的簽名實(shí)現(xiàn)方法.

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.

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

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

相關(guān)文檔推薦

Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
Changing where cursor starts in an expanded EditText(更改光標(biāo)在展開(kāi)的 EditText 中的開(kāi)始位置)
Send backspace key event to edit text(發(fā)送退格鍵事件以編輯文本)
Android: How to set password property in an edit text?(Android:如何在編輯文本中設(shè)置密碼屬性?)
Label in a editbox in android(在android的編輯框中添加標(biāo)簽)
actionDone imeOption doesn#39;t work on EditText in Android 2.3(actionDone imeOption 不適用于 Android 2.3 中的 EditText)
主站蜘蛛池模板: 少妇一级淫片免费播放 | 久久久久久中文字幕 | 日本成人一区二区 | 羞羞视频免费在线观看 | 最近中文字幕在线视频1 | 亚洲视频免费 | 在线视频 中文字幕 | 日本特黄a级高清免费大片 特黄色一级毛片 | 精品国产乱码久久久久久图片 | 国产欧美一区二区三区在线看 | 99视频在线免费观看 | 欧美日韩综合精品 | av中文字幕在线 | 一级毛毛片| av二区三区| 天天综合永久 | 精品人伦一区二区三区蜜桃网站 | 91免费版在线观看 | 日韩精品一区二区三区在线播放 | 精品久久99 | 欧美精品久久久久久 | 国产精品视频一二三区 | 成人区一区二区三区 | 欧美v片 | 国产成人免费 | 日韩在线视频观看 | 日韩精品色网 | 国产精品毛片 | 国产成人精品免高潮在线观看 | 高清视频一区二区三区 | 日韩欧美在线观看 | 欧美日韩不卡合集视频 | 日本一区二区不卡 | 中文字幕亚洲视频 | 国产1区2区 | 欧美一区二区免费视频 | 伊人最新网址 | 日本爱爱视频 | julia中文字幕久久一区二区 | 99这里只有精品视频 | 97精品视频在线 |