[英]NSHourCalendarUnit and NSMinuteCalendarUnit are deprecated. How to split up hours and minutes?
I have implemented NSCalendarUnit in my project to split hours and minutes . 我在我的项目中实现了NSCalendarUnit来分解小时和分钟。 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. 在IOS8,
NSHourCalendarUnit
, NSMinuteCalendarUnit
, NSSecondCalendarUnit
这些都已被弃用,现在如何处理这个问题。 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;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.