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 7951783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:39:56+00:00 2026-06-04T02:39:56+00:00

I am trying to find a simple tutorial for inserting custom objects asynchronous on

  • 0

I am trying to find a simple tutorial for inserting custom objects asynchronous on uitableview cells while scrolling because my uitableview does not scroll nicely and smoothly. I have searched but i only have found about images asynchronous loading not helpful. I have an uiview that needs to be loaded asynchronous. Too much processing work is needed before the object loads as a result scrolling is not smooth.

Any help appreciated.

  • 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-04T02:39:58+00:00Added an answer on June 4, 2026 at 2:39 am

    This is not as hard as it seems. There is only one caveat. You must know the height of your cell even when it is not fully loaded.

    If the tableView has a constant row height, then set tableView.rowHeight. If you need to determine row height on the fly use UITableViewDelegate’s –tableView:heightForRowAtIndexPath: callback.

    Then in -tableView:cellForRowAtIndexPath dequeue a cell, set it to some initial state, kick off a NSOperation or a GCD block, and finally return the cell that you have reset.

    In the NSOperation or CCG block you will perform the work you need, then call back into the main thread to set the values into the cell. This is the essence of async cell loading.


    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        // dequeue a cell
    
        // Reset the cell
        cell.imageView.image = nil;
        cell.textLabel.text = nil;
        cell.detailTextLabel.text = nil;
    
        // Use gcd
        dispatch_queue_t queue = dispatch_queue_create("blah blah replace me blah", 0);
        dispatch_async(queue, ^{ 
    
            // Do work in the background
    
            UIImage *image       = value1;
            NSString *text       = value2;
            NSString *detailText = value3;
    
            dispatch_async(dispatch_get_main_queue(), ^{ 
                // Back to main thread to set cell properties.
                if ([tableView indexPathForCell:cell].row == indexPath.row) {
                    cell.imageView.image      = image;
                    cell.textLabel.text       = text;
                    cell.detailTextLabel.text = detailText;
                }
            });//end
        });//end
        dispatch_release(queue);
    
        // Return the reset cell
        return cell;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find simple, elegant way to get all the pertinent name,value
I'm trying to find a simple solution to a specific problem, which is a
I'm trying to find a simple way to call a NSLog to trace myPoint
I am trying to find a simple yet powerful way to distribute the video
I am trying to find the best option to create a simple progress bar
I am writing a simple program, which is trying to find next palindrome number
it's a simple issue about optim() function on R. I am trying to find
I'm trying to make a simple php script to find all src attributes from
I'm trying to do something very simple, yet I can't seem to find the
What I'm trying to do is fairly simple, but I can't find the way

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.