「IOS開発」calendarからNSdateに変換するサンプルコード
サンプルコード:
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDateComponents *comps;
comps = [calendar components:(NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit) fromDate:[[NSDate alloc] init]];
[comps setHour:+24]; //+24次の日date,-24は前の日date;
[comps setMinute:0];
[comps setSecond:0];
NSDate *nowDate = [calendar dateByAddingComponents:comps toDate:showDate options:0];