Category Archives: iOS

Calculate Age from Date of Birth in Objective-C

Most of the times, in applications, you want to calculate age as a number not a Date string. Here is a function to convert date to a meaningful integer. +(NSInteger)age:(NSDate *)dateOfBirth { NSCalendar *calendar = [NSCalendar currentCalendar]; unsigned unitFlags = … Continue reading

Posted in iOS | Tagged , | 1 Comment