ibireme / YYWebImage

Asynchronous image loading framework.
MIT License
3.56k stars 615 forks source link

使用NSURLSession代替NSURLConnection #31

Open yxztj opened 8 years ago

yxztj commented 8 years ago

在NSURLConnection.h里面提到 /* DEPRECATED: The NSURLConnection class should no longer be used. NSURLSession is the replacement for NSURLConnection */ 是否考虑把YYWebImageOperation里的NSURLConnection替换为NSURLSession?

ibireme commented 8 years ago

目前还能用,而且还需要支持 iOS6,所以没打算换。 不过以后总会找机会换掉的。

yxztj commented 8 years ago

OK。或者也可以像AFNetworking那样分版本支持不同的iOS版本? 毕竟使用deprecated的类有一定风险。

ibireme commented 8 years ago

这种 API,只有大版本号更新的时候,才会有被完全抛弃的危险,在那之前有好几个月的测试版,来得及改。

smithereensarr commented 8 years ago

感谢作者,iOS10马上就出了,是否有考虑抛弃iOS6?目前90%以上的公司都面向iOS7+,并在明年直接考虑面向iOS8+,我也建议改为NSURLSession,希望作者能采纳!最后,对您的贡献表示感谢🙏

xxycode commented 7 years ago

SD也早些时候换成nsurlsession了

Smeegol commented 7 years ago

现在都iOS8+了,iOS7也是时候抛弃了

crespoxiao commented 7 years ago

有 一个 PR 是做这个的 ,但是代码是有一些问题的,比如 LOCK 都没初始化,暂时不敢用

indulgeIn commented 5 years ago

作者有空希望替换为 NSURLSession 。

muxueChen commented 5 years ago

今天读了YYWebImage,在源码里面好像没有看见处理相同url 重复下载的代码

muxueChen commented 5 years ago

看了源码,里面还是用的是 NSURLConnection,现在这个网络这一块都是在用 NSURLSession 了