Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9051947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:02:37+00:00 2026-06-16T13:02:37+00:00

I used the console to check if it reloads and it does in cellForRowAtIndexPath

  • 0

I used the console to check if it reloads and it does in cellForRowAtIndexPath. It causes the table view to get stuck for a moment. I thought it was because of images but now I can’t figure out the problem.
Any help would be great.


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog( @"Cell loading" );
    static NSString *CellIdentifier = @"showVideo";
    CustomVideoCell *cell = (CustomVideoCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
    {
        cell=[[CustomVideoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] ;
    }


    NSURL *url = [NSURL URLWithString:[data objectForKey:@"profilepicture"]];
    NSData *data = [NSData dataWithContentsOfURL:url];

    [cell.playimage setImageWithURL:[NSURL URLWithString:[data objectForKey:@"profilepicture"]]
                 placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

    return cell;

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:02:38+00:00Added an answer on June 16, 2026 at 1:02 pm

    This line makes the issue:

    NSData *data = [NSData dataWithContentsOfURL:url];
    

    This is a synchronous call, that’s why you feel a lag while scrolling.

    Never call such methods on main thread, it will cause your app unresponsive. If the data is too high, then it’ll take more time for downloading and thus take more time to respond to UIEvents.

    You need to cache the images once it’s downloaded, else each time when the table is reloaded it’ll download it again. If the image is already downloaded you need to display it from the cache don’t download it again. You need to handle this on your cellForRowAtIndexPath.
    You can write your own code for doing these tasks or you can rely on the following samples.

    Check the following libraries/source code:

    1. HJCache
    2. LazyTableImages
    3. SDWebImage
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used console.log(response); and got the following in console (in Firebug). How do I
I used the Chrome Console to write a simple statement: console.log(4) and received the
I used this MSDN example to construct my console host app: http://msdn.microsoft.com/en-us/library/ms731758.aspx It works
The below console logs An active access token must be used to query information
I am using the console application i used multi threading in the same. I
I'm programming a console application with Java that can be used to monitor a
In a console app, an ascii spinner can be used, like the GUI wait
I have used log4net in winforms before. First time using with a wpf console
What's the difference between console.log(process.cwd()) and console.log(__dirname); I've seen both used in similar contexts.
I've written up a small console utility. Throughout the application, I have used slf4j/log4j

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.