Note that there are some explanatory texts on larger screens.

plurals
  1. POTTTableImageItem doesn't load the image until scroll
    text
    copied!<p>I'm using the three20 project for my iPhone app. I've narrowed my problem down and I'm now just trying to re-create the 'Web Images in Table' example that comes with the project. I've copied the code <em>exactly</em> as in the project, with the exception that I do not use the TTNavigator (which the example does) but I am adding my TTTableViewController manually to a tabBar.</p> <p>The problem is as follows; the images in the table should load automatically from the web, like in the example. But they only load <em>after</em> I scroll the table up and down.</p> <p>In the console it clearly says it is downloading the images, and you see the activity indicator spinning like forever.. And unless I scroll up and down once, the images will never appear.</p> <p>Anyone? Thanks in advance.</p> <p>P.S: If I'm using this code in any random UIView, It also doesn't work (only shows a black square):</p> <pre><code>TTImageView* imageView = [[[TTImageView alloc] initWithFrame:CGRectMake(30, 30, 100, 100)] autorelease]; imageView.autoresizesToImage = YES; imageView.URL = @"http://webpimp.nl/logo.png"; [self.view addSubview:imageView]; </code></pre> <p>If I put this code in my AppDelegate (right onto the window), it does work .. strange?</p> <p><strong>POSSIBLE SOLUTION:</strong> Although I stopped using TTImageView for this purpose, I do think I found out what the problem was; threading (hence accepting the answer of Deniz Mert Edincik). If I started the asynchronous download (because basically that is all the TTImageView is, an asynchronous download) from anywhere BUT the main thread, it would not start. If I started the download on the main thread, it would start immediately..</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload