在我的应用程序中,我有一个UISearchBar,它可以用NSURLConnection、GCD和NSXMLParser实时解析结果。在WiFi和3G中一切正常,但在EDGE中我得到了标题中描述的错误。
解析器紧跟在连接didReceiveData之后启动。有什么想法吗?
发布于 2012-11-09 20:37:51
您应该在触发connectionDidFinishLoading:时开始解析。在didReceiveData中,只需连接接收到的数据即可。请参阅文档:https://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSURLConnectionDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/NSURLConnectionDelegate
https://stackoverflow.com/questions/13308103
复制相似问题