ios – 什么是AFNetworking 2.0等同于取消 *** 作

ios – 什么是AFNetworking 2.0等同于取消 *** 作,第1张

概述我曾经能够在AFHTTPClient类上使用cancelAllHTTPOperationsWithMethod:来取消 *** 作.取消 *** 作的新方法是什么? 您可以手动取消 *** 作.您可以从 *** 作队列中获取 *** 作: AFHTTPRequestOperationManager *manager = // ...for (NSOperation *operation in manager.operationQueu 我曾经能够在AFhttpClIEnt类上使用cancelAllhttpOperationsWithMethod:来取消 *** 作.取消 *** 作的新方法是什么?解决方法 您可以手动取消 *** 作.您可以从 *** 作队列中获取 *** 作:
AFhttpRequestoperationManager *manager = // ...for (NSOperation *operation in manager.operationQueue.operations) { // here you can check if this is an operation you want to cancel    [operation cancel];}// or just cancel all of them![manager.operationQueue cancelAllOperations];

如果您更多地使用NSURLSession,AFURLSessionManager也有一个operationQueue属性.

总结

以上是内存溢出为你收集整理的ios – 什么是AFNetworking 2.0等同于取消 *** 作全部内容,希望文章能够帮你解决ios – 什么是AFNetworking 2.0等同于取消 *** 作所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1102787.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存