Code Monkey home page Code Monkey 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

3y icon 3y

3y原创技术文章导航

ant-design-pro icon ant-design-pro

👨🏻‍💻👩🏻‍💻 An out-of-box UI solution for enterprise applications

awesome-java-cn icon awesome-java-cn

Java资源大全中文版,包括开发库、开发工具、网站、博客、微信、微博等,由伯乐在线持续更新。

from_coder_to_expert icon from_coder_to_expert

2019年最新总结,从程序员到CTO,从专业走向卓越,分享大牛企业内部pdf与PPT

gcdwebserver icon gcdwebserver

Lightweight GCD based HTTP server for OS X & iOS (includes web based uploader & WebDAV server)

hangzhou_house_knowledge icon hangzhou_house_knowledge

2017年买房经历总结出来的买房购房知识分享给大家,希望对大家有所帮助。买房不易,且买且珍惜。Sharing the knowledge of buy an own house that according to the experience at hangzhou in 2017 to all the people. It's not easy to buy a own house, so I hope that it would be useful to everyone.

hutool icon hutool

A set of tools that keep Java sweet.

ibase4j icon ibase4j

Spring,SpringBoot 2.0,SpringMVC,Mybatis,mybatis-plus,motan/dubbo分布式,Redis缓存,Shiro权限管理,Spring-Session单点登录,Quartz分布式集群调度,Restful服务,QQ/微信登录,App token登录,微信/支付宝支付;日期转换、数据类型转换、序列化、汉字转拼音、身份证号码验证、数字转人民币、发送短信、发送邮件、加密解密、图片处理、excel导入导出、FTP/SFTP/fastDFS上传下载、二维码、XML读写、高精度计算、系统配置工具类等等。

ijkplayer icon ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.

incubator-dubbo icon incubator-dubbo

Apache Dubbo (incubating) is a high-performance, java based, open source RPC framework.

iosnetworkdemo icon iosnetworkdemo

本工程 有三个demo, 主要是ios网络库封装的简单集合。同时利用 NSstream 来模拟http请求获取数据

java icon java

一些用Java写的小东西(没什么用,大家不要star了😄)

jeeplatform icon jeeplatform

一款企业信息化开发基础平台,拟集成OA(办公自动化)、SCM(供应链系统)、ERP(企业资源管理系统)、CMS(内容管理系统)、CRM(客户关系管理系统)等企业系统的通用业务功能 JeePlatform项目是一款以Spring Framework为核心框架,集ORM框架Mybatis,Web层框架SpringMVC和多种开源组件框架而成的一款通用基础平台,代码已经捐赠给开源**社区

kyvedioplayer icon kyvedioplayer

KYVedioPlayer 是基于AVPlayer的封装视频播放器,支持播放mp4、m3u8、3gp、mov等格式;支持网络视频和本地视频播放;支持全屏和小屏幕播放;还在UITableViewCell中播放视频 ;支持横屏竖屏自动播放。

ljphotogroup icon ljphotogroup

1.一个简单的图片浏览放大缩小管理器 2.支持图片放大和缩小效果,同时图片是原去原回的放大缩小效果

ljphotogroupmanager icon ljphotogroupmanager

5张图片,展示出来。然后利用图片放大缩小管理类展示图片,多张图片可以滑动浏览

messagedisplaykit icon messagedisplaykit

An IM App like WeChat App has to send text, pictures, audio, video, location messaging, managing local address book, share a circle of friends, drifting friends, shake a fun and more interesting features.

miaosha icon miaosha

⛹️🐘秒杀系统设计与实现.互联网工程师进阶与分析🙋🐓

nettyrpc icon nettyrpc

NettyRPC is high performance java rpc server base on Netty,using kryo,hessian,protostuff support message serialization.

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.