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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:16:31+00:00 2026-05-27T19:16:31+00:00

In my app I have a tableview being filled by values from an NSMutableArray.

  • 0

In my app I have a tableview being filled by values from an NSMutableArray. This mutable array is being added to in a separate viewcontroller, and so I have to reload the data.

This is probably a very simple question, but I have reading 15+ posts and none of them seem to address xcode 4.2, and where exactly to put the [self.tableView reloadData]. Where exactly should this method be put? When I have tried putting it in various places in the tableviews source code, the tableview initialized for the first time with no values in it.

Or should it be put in the other viewcontrollers code, in which case how can I reference the particular instance of my UItableview subclass that is being used?

Thanks very much in advance.

  • 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-05-27T19:16:31+00:00Added an answer on May 27, 2026 at 7:16 pm

    There is nothing special about Xcode 4.2 that should make any difference here, so you should pay attention to other sources you have found, even if they refer to other versions of Xcode.

    It doesn’t have to be [self.tableView reloadData] exactly. You send the table view object the reloadData message. How you access that table view object – through a property on self, through an instance variable, through a property in another class, etc. – is up to you.

    If you already have the tableView property set up, then the simplest way of reloading the data from another view controller is to simply send the table view object the reloadData message directly. So, for example, if a method in ViewControllerFoo has a pointer to ViewControllerBar called bar and knows it should reload its table view, it could call [bar.tableView reloadData].

    If you don’t have the property set up, you can create it yourself, or you could create a reloadData method on the view controller holding the table view that does it on behalf of other view controllers.

    However these approaches mix up logic and presentation, which is usually a pretty poor architecture. If one view controller knows that another view controller should be updating its view, then chances are, you should be factoring out some of that logic to a third class that is independent of any particular view controller. That third class can transmit notifications, or your view controllers can listen for changes to its state via KVO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tableview based app that downloads rss feeds from the web. So
I have an app that starts with a tableview (from a xib) that loads
I have a tableview and detail view app, in the tableview I have this
I have a UITableView that is being populated from an NSMutable array that has
I have a tableView which has cells with phone numbers. The app is not
I have an app that has a TableView, NavigationView and TabBar running together. There
I have an app that uses a tableview, along with a UIButton that I
I have an app which contains a scrollview with several tableviews. Each tableview is
This is a continuation of the question here: JBoss - does app have to
I have a UITableView in my app in which I load several images from

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.