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

  • Home
  • SEARCH
  • 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 187969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:55:11+00:00 2026-05-11T15:55:11+00:00

I have UITableViewController as the RootViewController. I need to add rows to the table

  • 0

I have UITableViewController as the RootViewController. I need to add rows to the table depending on data I get from another thread which I initiate from the RootViewController’s thread. When I retun back from other thread to my RootViewController’s thread I have the updated data, But I can’t update the TableView. I called the [self.tableview reloadData]; method but that doesnt seem to work. I also tried the [self.tableview setNeedsDisplay] call but with no success. How do I update the TableView with new data?

In my RootViewController Class I have:  - (void) reload {  for(int i=0;i<[camDetails count];i++)  {     cCameraInformation *obj = [[cCameraInformation alloc] init];     obj = [camDetails objectAtIndex:i];     NSString *tString = [[NSString alloc] initWithFormat: @'        Remote     %s     %s',[obj->sCameraid UTF8String],[obj->sCameraid UTF8String]];     [tableEntry addObject:tString];  }  [self.tableView reloadData]; } 

Then there is a receive class thread which is continuously receiving data. Its base class is NSObject. So, I used the Application delegate class ( which has an instance of RootViewController class ) to call this reload data method of the RootViewController class in my receive thread.

I am unable to invoke the above method using performSelectorOnMainThread.

  • 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. 2026-05-11T15:55:12+00:00Added an answer on May 11, 2026 at 3:55 pm

    hey are you sure you are updating the table view display / reloading tableview on the main thread? i faced the same problem, the data was in there but until user scrolls, tableview was not updated

    upon googling i came to know you need to call the reloadData method on the main ui thread

    code example below:

    - (void) getDataOnNewThread {     // code here to populate your data source     // call refreshTableViewOnMainThread like below:     [self performSelectorOnMainThread:@selector(refreshTableView) withObject:nil waitUntilDone:NO]; }  - (void) refreshTableView {     [tableView reloadData]; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 201k
  • Answers 201k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Internet Explorer thinks the <li> tag is still there. I've… May 12, 2026 at 8:08 pm
  • Editorial Team
    Editorial Team added an answer Html2Text seems to be a good option May 12, 2026 at 8:08 pm
  • Editorial Team
    Editorial Team added an answer Yes, that's valid code. It will invoke either function1() or… May 12, 2026 at 8:08 pm

Related Questions

I've got the code below in my RootViewController (which is a UITableViewController). This code
I have a property that changes to invalid as I move between viewDidLoad and
This one is new to me. Not even sure what RootViewController.o is? though this
Preface : I am new to the iPhone SDK, Obj-C, Interface Builder and Cocoa.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.