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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:30:01+00:00 2026-05-23T17:30:01+00:00

There’s something I don’t understand with tableviews: how to add a new item in

  • 0

There’s something I don’t understand with tableviews: how to add a new item in a table view.

Here’s what I do: when i click on a button “+”, the modal controller appears, we enter a new item, and the table view should be edited, with a new item at the bottom. In the rootViewController, I attach the tableWebsites mutable array to the modal viewcontroller, so we have a copy of the mutable array and we can add the new item at the end of this copy:

ModifViewController *addView = [[ModifViewController alloc] initWithNibName:@"ModifViewController" bundle:nil];  
addView.tabWebSites = self.tabWebSites;  

And finally, in the rootViewController, we say :

[self.tableView reloadData];

So we copied the mutable array in RootView… to be edited in ModifView… but how does the tableview know that the mutable array tableWebsites edited in ModifView… is the one that should “fill” the table view? because we have a tableWebsites in RootView… and another tableWebsites in ModifView… in order to edit it. So i would think that : even if we say “reloadData”, it will reload the same mutable array in the RootView.

Do you understand what i mean? i’m sorry if it’s a mess, i have trouble to make myself clear 😉 Thanks for your answer.

Paul

  • 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-23T17:30:02+00:00Added an answer on May 23, 2026 at 5:30 pm

    UITableView objects are actually asking their data sources for the values to display, as well as the number of sections, etc…Sending reloadData to the table view will make it re-asking these values.

    So I think no matter with the array the data source is picking the values from, but these methods should always return the correct value.

    Useful links :

    Table View programming guide

    UITableView class reference

    UITableViewDataSource protocol reference

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

Sidebar

Related Questions

There is a table view with three sections. The last section may contain many
There is a div (form) which opens on the click of a button. There
There is a column that exists in 2 tables. In table 1, this column
There are two table s : one is the master and one the detail
There was some progress made to the earlier problem. Now there is a new
There is a Point (flash.geom.Point) class in as3 I want to add method to
There was a similar question asked here three years ago, but I want to
There is something strange happening. Param interceptor is the one in charge to take
There is something I miss with the notion of Synchronizing code in Android. Scenario
There's a webpage with something annoying on it which I'd like to hide every

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.