Folio Image Pipeline是iOS客户端的图像加载和缓存框架

网友投稿 601 2022-11-01

Folio Image Pipeline是iOS客户端的图像加载和缓存框架

Folio Image Pipeline是iOS客户端的图像加载和缓存框架

ImagePipeline

Folio Image Pipeline is an image loading and caching framework for iOS clients

Usage

let imagePipeline = ImagePipeline()imagePipeline.shared.load(/* image URL */, into: /* image view */, transition: .fadeIn /* default is `.none`*/, defaultImage: ..., failureImage: ...)

Example

override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! Cell ImagePipeline.shared.load(urls[indexPath.row % 200], into: cell.imageView, transition: .fadeIn, defaultImage: UIImage(named: "loading")!, failureImage: UIImage(named: "failed")!) return cell}

Supported content types

✅ PNG ✅ JPEG ✅ GIF ✅ WebP

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:90%人不懂的泛型局限性,泛型擦除,星投影
下一篇:深度解析SpringBoot中@Async引起的循环依赖
相关文章

 发表评论

暂时没有评论,来抢沙发吧~