ios - UITableview with images scroll very slowly -


After

I downloaded a UITableView its UITableViewCell which is a Images. Server

I noticed that the table scrolls very slowly

  - (UITableViewCell *) tableView:. (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath {static NSString * Cell identifier = @ "Pendulum cell"; JBParallaxCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier]; NSURL * imageUrl = [NSURL URLWithString: [[News objectAtIndex: indexPath.row] objectForKey: @ "Resim"]]; NSDTA * ImageData = [NSDTATA DATAVITY content of the: imageURL]; UIImage * imageLoad = [[UIImage alloc] initWithData: imageData]; cell.titleLabel.text = [[News objectAtIndex: indexPath.row] objectForKey: @ "Eddie"]; cell.subtitleLabel.text = [[News objectAtIndex: indexPath.row] objectForKey: @ "Resim"]; Cell. Pattern image. Image = image load; cell.selectionStyle = UITableViewCellSelectionStyleNone; Return cell; }     

You are loading the image file on the main thread and this operation will take your scroll Is slowing down Use the UIImageView + AFNetworking.h from F-Networking to speed up your application via Async image loading. Link

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -