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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -