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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:48:58+00:00 2026-05-27T01:48:58+00:00

I have my UITableView data organized such that the sections of the table are

  • 0

I have my UITableView data organized such that the sections of the table are the array elements of a NSMutableArray. Each element itself is a NSMutablearray of NSMutableDictionary, representing the row of each section and the data for each row.

When I create this, I load all the data and create each section’s NSMutableArray, then add them one at a time to the “outer” NSMutableArray. I reference the rows by:

[[[objData objectAtIndex:indexPath.section] objectAtIndex:indexPath.row] objectForKey:@"name"]

and have had no problems doing this. I think the advantage here is I can have a variable number of sections, which I need, and a variable number of rows in each section, also a requirement.

I do, however, get an error when I try to add a row to a section.

[[objData objectAtIndex:0] addObject:[[NSMutableDictionary alloc] initWithObjectsAndKeys: objectID,@"id",nameVar,@"name",nil]];

doesn’t work. Is this the problem, or is there a problem with the way I’ve layed out the array? I’m thinking that the inner NSMutableArray is only alloted so much memory, but I would have thought the array is just an array of references and wouldn’t have that issue. I could be wrong – it isn’t the first time.

Thanks in advance for wrapping your head around this.

  • 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-27T01:48:59+00:00Added an answer on May 27, 2026 at 1:48 am

    How are you intializing the array and the values inside it? I think you have an array that is not mutable.

    Also an NSMutableArray has a variable size, calling initWithSize is completely unnecessary. The array will resize if it needs to.

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

Sidebar

Related Questions

I have a UITableView that was created from data coming from a mutable array.
I have a UITableView whose data source is an NSMutableArray. The array contains NSMutableDictionaries
I have a table that displays data from a single array and organizes the
How do I have a UITableView be notified that the data it is using
I have a problem with data in UITableView. I have UIViewController, that contains UITableView
I have a UITableView that displays single large images in each cell. The names
I have a UITableView that fetches data from CoreData using FetchedResultsController and it registers
I have a UITableView that loads remote data from the network. I have logic
I have a UITableview cell that gets a tally from a core data database.
I have UITableView and it add data from NSMutableArray. So, I want to know

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.