Git Product home page Git Product logo

我写了一个tabview加载多张网络图片的demo,在模拟器中快速滑动,加载图片时,是好的。

问题:在手机上一运行,发现xcode自动打印这个log 错误“JPEGDecompressSurface : Picture decode failed: e00002d1 ”,同时真机上的图片加载不完全。

因为我这个加载多张网络图片的demo包含图片缓存到磁盘中,最终定位原因是多张图片写磁盘时,出现问题。

解决办法:将写图片到磁盘放到异步线程中去执行,然后就不报上面的错误了,同时真机上的图片也完全加载出来了。

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
BOOL a = [[LJCacheDataManage shareInstance]writeFile:self.recieveData withName:self.imageUrl];
if (a) {
CHDebugLog(@"-----文件写入成功");
}
});

robinson_911's Projects

potatso-ios icon potatso-ios

Potatso is an iOS client that implements Shadowsocks proxy with the leverage of NetworkExtension framework in iOS 9.

scrapy-examples icon scrapy-examples

Multifarious Scrapy examples. Spiders for alexa / amazon / douban / douyu / github / linkedin etc.

spring-projects icon spring-projects

spring 集成redis,spring mvc实现session共享以及 redis排行榜

spy-debugger icon spy-debugger

微信调试,各种WebView样式调试、手机浏览器的页面真机调试。便捷的远程调试手机页面、抓包工具,支持:HTTP/HTTPS,无需USB连接设备。

taoshop icon taoshop

开源电子商务项目,SpringBoot+Dubbo技术栈实现微服务,实现一款分布式集群的电商系统. 项目releases链接:https://github.com/u014427391/taoshop/releases (开发中...)

tfreact icon tfreact

基于React,Webpack和Antd的简单框架Demo

tfswift icon tfswift

本工程基于4个tabbar,同时包含登陆登出界面。是基于swift3.0 的一个图片缓存demo,同时包含swift3的部分学习代码。

universalproject icon universalproject

基于MVC架构的iOS轻量级框架,封装了基类、基于猿题库YTKNetwork的网络服务、工具库,NavigationController转场动画/瀑布流/粒子动画/小demo,已适配iOS11 & iPhone X。欢迎Star🌟

vhr icon vhr

微人事是一个前后端分离的人力资源管理系统,项目采用SpringBoot+Vue开发。

wclpasswordview icon wclpasswordview

iOS开发进阶 - 实现类似微信和支付宝的密码输入框(UIKeyInput协议)

weixin_crawler icon weixin_crawler

高效微信公众号历史文章和阅读数据爬虫powered by scrapy

yfax-parent icon yfax-parent

SprintBoot开发的Rest API接口项目实战,集成了拦截器,日志处理,mysql,mybatis, oauth2.0, spring secutity等,已投入生产线上使用。应用了https://github.com/hemin1003/spring-boot-study 所含功能。配套的后台管理系统实战见:https://github.com/hemin1003/aylson-parent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.