为什么NSCalendarDate在Simulator SDK中而在iPhone SDK中没有?

edo*_*lin 2 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

是什么赋予了?

Jar*_*aus 5

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

重要提示:强烈建议不要使用NSCalendarDate.它尚未弃用,但可能是在Mac OS X v10.5之后的下一个主要操作系统版本中.对于日历计算,您应该使用NSCalendar,NSDate和NSDateComponents的合适组合,如Cocoa日期和时间编程指南中的日历中所述 .

寻找iPhone的版本NSCalendar,NSDateNSDateComponents