Wow, first post in the forum for the new book. I am honored.
I am enjoying the new book, just a couple questions…
On bottom of page 51
// Create the date object NSDate *now = [[NSDate alloc] init]; NSCalendar *cal = [NSCalendar currentCalendar]; NSDateComponents *weekComponents = [[NSDateComponents alloc] init];
Why don’t I have to alloc and init the NSCalendar object “cal”?
On top of page 52
// Create a date/time object that is i weeks from now NSDate *iWeeksFromNow; iWeeksFromNow = [cal dateByAddingComponents:weekComponents toDate:now options:0];
Why don’t I have to alloc and init the NSDate object “iWeeksFromNow”?
Thanks in advance,