読者です 読者をやめる 読者になる 読者になる

DRYな備忘録

Don't Repeat Yourself.

【iOS】Timestamp to NSDate Object

Goal

  • Get NSDate instance from timestamp-like NSInteger

Solution

  • Use dateWithTimeIntervalSince1970 method of NSDate
NSDate *d = [NSDate dateWithTimeIntervalSince1970:timestamp];

DRY