0

I have uitableview with custom cell.

In cell i have some UIImageViews.
I use async load data.
When its loaded, i should update my uiimageview in cell.

NSString *urlInString =[NSString stringWithFormat:@"%@/index.php/api/getJsonHotels?page=%i&rows_count=%i",webSite,counterPage,5];
    NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:urlInString]];

NSURLConnection *mConnect = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self startImmediately:YES];
if(mConnect)
{
    dataContent = [NSMutableData new];
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
- (void)connectionDidFinishLoading:(NSURLConnection *)connection

I can do it without tableView reload and reload cell? How i can do it?

Vikas S Singh
  • 1,748
  • 1
  • 14
  • 29

2 Answers2

0

Try this code:

[tableview reloadData];
The iOSDev
  • 5,237
  • 7
  • 41
  • 78
NANNAV
  • 4,875
  • 4
  • 32
  • 50
0

Make a custom class of UIImageView and add it to your cell. This class should be responsible for downloading and setting the image when download completes.

To show some quality work, you should display an activity indicator while downloading.

Abdullah Umer
  • 4,234
  • 5
  • 36
  • 65
  • see this link http://allseeing-i.com/ASIHTTPRequest/ for using a good and easy wrappers of NSURLRequest and NSURLConnection. – Abdullah Umer Oct 09 '12 at 10:26