iphone - Images load table is very slow -


this question has answer here:

i getting data server contains images url , set tablview cell correctly done.

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     appdelegate * delegate=(appdelegate *)[[uiapplication sharedapplication]delegate];      static nsstring *cellidentifier = @"cell";     cell = [tableview dequeuereusablecellwithidentifier:cellidentifier];     if (cell == nil)     {         cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier];     }      cell.textlabel.text=[delegate.firstarray objectatindex:indexpath.row];      nslog(@"%@",delegate.thirdarray);      url = [nsurl urlwithstring:[nsstring stringwithformat:@"%@",[delegate.thirdarray objectatindex:indexpath.row]]];      data = [[nsdata alloc]initwithcontentsofurl:url];      uiimage * img=[uiimage imagewithdata:data];      cell.imageview.image=img;      return cell; } 

in delegate.thirdarray contais url

 "http://awe.com/app/images/can.png", "http://awe.com/app/images/card.png", "http://awe.com/app/images/tp.png", "http://awe.com/app/images/tricks.png"  

images load take time load image , scroll tableview slow want fast how may this.

you have load images asynchronously tableview can load fast here in code tableview take time because load image every cell.

please check below answer can find how load images asynchronously.

https://stackoverflow.com/a/15377082/1713478

please change url url

hope problem solved.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -