iphone - 为什么 NSCalendarDate 在 Simulator SDK 中,但不在 iPhone SDK 中?

标签 iphone calendar date

我想使用 NSCalendarDate,它存在于

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/ System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSCalendarDate.h

但不存在于

下的任何地方

/Developer/Platforms/iPhoneOS.platform

什么给出了?

最佳答案

10.5之后NSCalendarDate将被弃用。因此它可能不存在于 iPhone SDK 中:

Important: Use of NSCalendarDate strongly discouraged. It is not deprecated yet, however it may be in the next major OS release after Mac OS X v10.5. For calendrical calculations, you should use suitable combinations of NSCalendar, NSDate, and NSDateComponents, as described in Calendars in Date and Time Programming Guide for Cocoa.

查找 NSCalendar 的 iPhone 版本, NSDateNSDateComponents

关于iphone - 为什么 NSCalendarDate 在 Simulator SDK 中,但不在 iPhone SDK 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1051156/

相关文章:

Java 1.5 Calendar#compareTo() 混淆

java - 在 Java 中连接两个字符串然后转换为日期

date - 野田市时间日期比较

ios - 应用程序始终在横向左侧启动

ios - 如何根据通过 TableView 进行的选择在 uiview 中显示不同的 View Controller (请参阅说明中的图片)?

c# - 按天数过滤日期列表

java - 如何使用 Java 处理与 Selenium 自动化中的其他元素重叠的日历?

iPhone 后台任务在某个时刻停止运行

iphone - 重新排列 UIAlertView 的按钮布局

java - 如何在Java中获取不完整一周的第一天/最后一天