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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:47:37+00:00 2026-06-01T14:47:37+00:00

I have a NSMutableArray filled with NSMutableArray’s. I would like to fill my table

  • 0

I have a NSMutableArray filled with NSMutableArray’s. I would like to fill my table view up with the appropriate amount of rows, based on the size of a particular indexes array.

I currently have the array setup to grab the first element in the array, and the table then sets the amount of rows to that particular array’s size. Ideally, i’d like to set the rows to the count of each element, of which most (arrays) have differing sizes.

Here is what I currently have:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

        // Return the number of rows in the section.

        WorkoutManager *workoutManager = [WorkoutManager sharedInstance];
        NSMutableArray *blah = [[workoutManager workouts] objectAtIndex:0];

        return [blah count];
    }

Any help would be greatly 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-01T14:47:39+00:00Added an answer on June 1, 2026 at 2:47 pm

    Do it in following way:

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
    WorkoutManager *workoutManager = [WorkoutManager sharedInstance];
            return [[workoutManager workouts] count];
    }
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
    WorkoutManager *workoutManager = [WorkoutManager sharedInstance];
            NSMutableArray *blah = [[workoutManager workouts] objectAtIndex:indexPath.section];
    
            return [blah count];
    }
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    WorkoutManager *workoutManager = [WorkoutManager sharedInstance];
            NSMutableArray *blah = [[workoutManager workouts] objectAtIndex:indexPath.section];
    YourObj *obj = [blah objectAtIndex:indexPath.row];
            //Do further...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an NSMutableArray in my app what is filled like so: NSMutableArray
I’m populating a UITableView based on the values of an NSMutableArray. This table view
I have an NSMutableArray that is loaded into a table view. The data in
I have an NSMutableArray filled with BeziarPaths. I'd like to serialize it so that
I have an NSMutableArray filled with Task objects. I want to be able to
I have two NSMutableArray filled with data object. how do I compare both array
I have an undetermined size for a dataset based on unique integer keys. I
I can't get my head around this: I have an instance of NSMutableArray filled
I have a NSMutableArray which repeatedly will be filled with the changing contents of
I have an NSMutableArray filled up of UNIX dates (1305410327), and I want to

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.