# CountDown **Repository Path**: hongwing/CountDown ## Basic Information - **Project Name**: CountDown - **Description**: Simply implement the CountDown by UIPickerView and NSDateComponents - **Primary Language**: Objective-C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-08-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CountDown ### Simply implement the CountDown by UIPickerView and NSDateComponents ## My ideas * Use the method NSCalendar *calendar = [NSCalendar currentCalendar]; unsigned unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; ``NSDateComponents *comp = [calendar components:unitFlags fromDate:_standardTime toDate:_destTime options:0];`` #### By this method , I can get How much the time distance between 2 dates.frankly,this method is the point to the countdown. ##### (look **details into demo**) ## Picture ![image](/Users/lister/Desktop/1.png)