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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:04:58+00:00 2026-05-17T00:04:58+00:00

I have an entity which stores generic information about an event. In the entity,

  • 0

I have an entity which stores generic information about an event. In the entity, the date the event took place is stored.

My view hierarchy is such that I want the user to be able to select a year, which loads another view requesting the month in the selected year. This finally opens a view with a record of all the events that took place within that month and year. If the user selects and event, they can then either edit or view it’s details. This is being implemented in a tableview/navigation controller.

i.e. 2010
     2009 --> Dec
     2008     Nov --> Event 3
     2007     Oct     Event 2
                      Event 1 --> Detail View

As the user adds new events, it is very likely that the month and year will change. I don’t want to create an array for months or years unless an event actually took place, and I guess I would decide what array to store the entry in when it is loaded by referencing the event date and using some programming logic to put it into the correct month and year array. However, my programming experience is letting me down somewhat, and I’m struggling to come up with an implementation that will allow me to dynamically create an unknown number of arrays. Please could somebody explain how to go about this, or point me in the direction of an article/post that demonstrates this? As I have had no luck with searching, I’d like to know if it is even possible?

  • 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-17T00:04:59+00:00Added an answer on May 17, 2026 at 12:04 am

    You can use NSMutableDictionary. You have a big dictionary contains

    key -> value    
    year -> NSDictionary           
            month -> ...
    

    Then when you have a new year, you can put into the NSDictionary, if your year is already there, you can look up it and put into the month dictionary…

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

Sidebar

Related Questions

I have an entity that stores information about my photos in core data. One
Let's say I have an Account entity, and an AccountData entity (which stores some
i have an entity-model file (edmx) file which contains few tables and few stored
I have this stored procedure, which is mapped in an Entity Framework 4.1 object.
I have a table which stores historical data. It's mapped to an Entity with
I have a custom UserType which stores a date/time value in a TIMESTAMP field
I have a form which takes users information and stores it in the database.
I have an Entity which holds a collection of OtherEntity in a many-to-many style
I have an entity which needs fields from another table. The second table is
I have an entity which looks something like this: (I'm coding to the web

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.