iOS中的NSURLErrorCancelled = -999是什么?

前端之家收集整理的这篇文章主要介绍了iOS中的NSURLErrorCancelled = -999是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有人可以描述如何使用“NSURLErrorCancelled = -999”.

解决方法

来自Apple文档:

NSURLErrorCancelled (-999)

“Returned when an asynchronous load is canceled. A Web Kit framework
delegate will receive this error when it performs a cancel
operation on a loading resource. Note that an NSURLConnection or
NSURLDownload delegate will not receive this error if the download is
canceled.”

你可以做的最好的事情就是忽略这个错误

if ([error code] != NSURLErrorCancelled) {
   //here you'll get a real error 
}
原文链接:https://www.f2er.com/iOS/330757.html

猜你在找的iOS相关文章