Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用sendAsynchronousRequest:queue:completionHandler:nsurlconnection 的类功能。如何取消此连接?
sendAsynchronousRequest:queue:completionHandler:
你不能。如果您需要取消 URL 请求的选项,您必须使用基于委托的方法NSURLConnection,例如connectionWithRequest:delegate:.
NSURLConnection
connectionWithRequest:delegate: