I have implemented NSCalendarUnit in my project to split hours and minutes . Here is the code..
[calendar components:( NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) fromDate:[df dateFromString:[NSString stringWithFormat:@"%@",workendTime_txtfld.text]]];
In IOS8, NSHourCalendarUnit
, NSMinuteCalendarUnit
, NSSecondCalendarUnit
these all are deprecated now how to handle this issue. Kindly let me know the solution for this issue..
它们已被NSCalendarUnitMinute
, NSCalendarUnitSecond
等替换。当你在代码中输入NSMinuteCalendarUnit
(无论如何在Xcode 6.1中),它应该给你一个警告,如果你读它,它会告诉你新的值。
These are new functions of calendar.
NSCalendarUnitSecond | NSCalendarUnitMinute | NSCalendarUnitHour |
NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.