문제

I'm using Three20's TTImageView for it's async image loading + caching.

I've noticed this issue a bunch of times where an image will show up as completely black, and never finish loading. Here's an example of what I'm seeing:

http://screencast.com/t/7O7fnedX5Z2

So...basically I'm wondering if this is a bug in three20, and if so, how I might go about fixing it (is there a patch out there that might fix it)...OR:

Is there a good TTImageView replacement that performs async image loading + caching?

도움이 되었습니까?

해결책

Turns out I was seeing the following in my log:

TTRequestLoader connection:didReceiveResponse:: TTDASSERT failed: 0 == _queue.maxContentLength || contentLength <=_queue\ .maxContentLength

(one for each failed image)

After that, a little bit of googling rendered:

http://groups.google.com/group/three20/browse_thread/thread/8bfac3654a6d9674/caf797f265445971?pli=1

Jeff Verkoeyen:

The comment immediately before that assert should shed some light on the situation.

  // If you hit this assertion it's because a massive file is about to be downloaded. 
  // If you're sure you want to do this, add the following line to your app delegate startup 
  // method. Setting the max content length to zero allows anything to go through. If you just 
  // want to raise the limit, set it to any positive byte size. 
  // [[TTURLRequestQueue mainQueue] setMaxContentLength:0] 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top