Re: iPhone Creating a months view

2010-01-04 Thread Nick Zitzmann
On Jan 4, 2010, at 2:17 PM, Henry McGilton (Boulevardier) wrote: > And NSCalendarDate appears to have vanished from Mac OS X Foundation as well > . . . It's still there; it's just been deprecated because Apple wants to push the NSCalendar and NSDateComponents classes due to their superior loca

Re: iPhone Creating a months view

2010-01-04 Thread Henry McGilton (Boulevardier)
On Jan 4, 2010, at 11:17 AM, Nick Zitzmann wrote: > > On Jan 4, 2010, at 11:35 AM, Eric E. Dolecki wrote: > >> I am creating an iPhone view that has 12 months of views in it starting with >> January. > > Don't make assumptions about calendars unless you are absolutely sure you can > get away

Re: iPhone Creating a months view

2010-01-04 Thread Eric E. Dolecki
Thanks for the insights. Currently I have a chunk of code in a loop that looks like this: *//'pointer' increments in a loop - so create a date for each month of the year, c defined outside the loop* int currentYear = [comp year]; NSDateComponents *components = [[[NSDateComponents alloc]init] aut

Re: iPhone Creating a months view

2010-01-04 Thread Nick Zitzmann
On Jan 4, 2010, at 11:35 AM, Eric E. Dolecki wrote: > I am creating an iPhone view that has 12 months of views in it starting with > January. Don't make assumptions about calendars unless you are absolutely sure you can get away with them, e.g. every calendar currently in use in the world uses

Re: iPhone Creating a months view

2010-01-04 Thread Alex Kac
One caution about using NSDateComponents, NSCalendar, etc… is that they are considerably slower than the CF date code. We took code written using the NS versions and rewrote them as CF version and the performance was easily 10x. Of course it was mostly noticeable only in loops where we were doin

Re: iPhone Creating a months view

2010-01-04 Thread Wyatt Webb
On Jan 4, 2010, at 10:35 AM, Eric E. Dolecki wrote: > I am creating an iPhone view that has 12 months of views in it starting with > January. > > For each subview (month) I need to get the 1st day of the month (which > calendar day it falls on as an int). For instance Jan 2010 begins on a > Frida

iPhone Creating a months view

2010-01-04 Thread Eric E. Dolecki
I am creating an iPhone view that has 12 months of views in it starting with January. For each subview (month) I need to get the 1st day of the month (which calendar day it falls on as an int). For instance Jan 2010 begins on a Friday (int of 5 I assume). This way I can properly populate the UILa