I am working on an application for the iPhone in which I want to get a start and end date for a Zodiac sign to display on the label. I am not sure how to store this info. I was thinking to store it in Core Data but that could be slow traversing it every time. My other idea is to have a NSDictionary of arrays for each sign. For example
self.zodiacSignsDates = [[NSDictionary alloc]initWithObjectsAndKeys:
[NSArray arrayWithObjects:@"December 22",@"January 20",nil], @"Capricorn",
[NSArray arrayWithObjects:@"January 21", @"February 18",nil], @"Aquarius"
,nil];
I might also use this NSDictionary later on to figure out zodiac sign for a birth date.
Please let me know what you think on on how to storing such data
Thanks!
Posting this as an answer, because of many comments. In addition: wouldn’t it be enough to just store the last day of the period in an array the same length as the zodiacs?
last one, i promise. if you want to keep those english strings, you could do this:
(since I assume, you already have a list of zodiacs around)
and then