how to set image in uitable view
<p>I download some images using an NSThread. When all the images are downloaded, I have to put them in cell.myimageview. Give me the solution for setting an image in a user-defined method.</p>

<pre><code> - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {


        static NSString *CellIdentifier = @"Cell";
        TableCell *cell = (TableCell *)[TableView dequeueReusableCellWithIdentifier:CellIdentifier];

        if (cell == nil) {

            cell = [[[TableCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];

        }


        NSString *bedsbaths=[NSString stringWithFormat:@"Beds:%@ Baths:%@",[[AppDeleget.statuses valueForKey:@"beds"] objectAtIndex:indexPath.row],[[AppDeleget.statuses valueForKey:@"baths"] objectAtIndex:indexPath.row]];
        cell.mlsno.text=[[AppDeleget.statuses valueForKey:@"mlsno"] objectAtIndex:indexPath.row];
        cell.price.text=[[AppDeleget.statuses valueForKey:@"price"] objectAtIndex:indexPath.row];
        cell.address.text=[[AppDeleget.statuses valueForKey:@"address"] objectAtIndex:indexPath.row];
        cell.bedsbaths.text=bedsbaths;
        cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;
    return cell;

    }
    -(void)LoadImage
    {
        for(int x=0;x&lt;[ListPhotos count];x++)
        {   
            NSData *imageData =[ListPhotos objectAtIndex:x]; 
            id path = imageData;
            NSURL *url = [NSURL URLWithString:path];
            NSLog(@"%@",url);
            NSData *data = [NSData dataWithContentsOfURL:url];
            UIImage *img = [[UIImage alloc] initWithData:data];
            [self performSelectorOnMainThread:@selector(downloadDone:) withObject:img waitUntilDone:NO];
        }

    }
    -(void)downloadDone:(UIImage*)img {

        // I have to set the cell here. How?        
        cell.myimageView.image=img
    }
</code></pre>
