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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:21:09+00:00 2026-05-22T03:21:09+00:00

In my project I must store a value for a period; Example: I have

  • 0

In my project I must store a value for a period;
Example: I have three buttons where I can choose a value: I have a button for “10” another for “100” and another for “1000”.
When I press a button I open a view where I can choose a period for these value: then for example I press “100”, and I select period by 15/05/2011 at 20/05/2011 and press ok.
The result is that at the month “May” in day 15 there is value 100, in day 16 there is value 100…..and in day 20 there is value 100.
Can I organize this method with an array of month where in an index there is another array of days and inside every days there is the value 100? But I don’t know how to do this…Can you help me?

  • 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-22T03:21:10+00:00Added an answer on May 22, 2026 at 3:21 am

    From what I gather in your question… you basically want an array of months, and within each month you have an array of days, and for each day you have an array of values? or just the value?

    Either way, what you can do is just nesting arrays. So you have one NSArray, and all the objects within that NSArray are also NSArrays and so on and so forth until you get the structure you want.

    If you could provide a more clear explanation of what exactly you wish to achieve then I might be able to elaborate on my answer, but I think this might get you onto the right track?

    NSMutableArray *months = [[NSMutableArray alloc] init];
    for (int i = 0; i &lt 12; i++) {
      NSMutableArray *days = [[NSMutableArray alloc] init];
    
      for (int j = 0; j &lt 30; j++) {
        NSMutableArray *values = [NSMutableArray alloc] init];
        [days addObject:values];
        [values release];
      }
      [months addObject:days];
      [days release];
    }
    

    I don’t have my mac around so forgive me for any errors, but I think you want something like this?

    So in the “months” array, there are 12 “days” arrays, and for each “days” array, there are 30 “values” arrays where you can add your values.

    NOTE: You will have to put in your logic to check for the actual amount of days there are in each month, as this code will just assume every month has 30 days.

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

Sidebar

Related Questions

I am working on a project that must store very large datasets and associated
I have BaseView which implement UIViewController. Every view in project must implement this BaseView.
I have a web project where I must import text and images from a
I must port a project to the compact framework. And can not convert to
I must have done something wrong. I have a C# project in Visual Studio
In my solution, I have created public class to store value and already declare
I have a project that can use either SQL Server or MS Access as
In our project we need to store some object (User, for example) and also
The project I have been given is to store and retrieve unstructured data from
So, I have this new project. My company uses the SalesForce.com cloud to store

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.