iOS 基础类解析 - NSDate
版权声明:本文为博主原创文章,未经博主同意不得转载。转载联系 QQ 30952589,加好友请注明来意。
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄
https://blog.csdn.net/sleks/article/details/24863095
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。 iOS 基础类解析 - NSDate
太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es)
本文遵循“署名-非商业用途-保持一致”创作公用协议
NSDate Class Reference
Inherits from | NSObject |
Conforms to | NSCopying NSSecureCoding NSObject (NSObject) |
Framework | /System/Library/Frameworks/ Foundation.framework |
Availability | Available in iOS 2.0 and later. |
Declared in | NSDate.h |
Companion guides | Date and Time Programming Guide Property List Programming Guide |
Related sample code | MVCNetworking TableView Fundamentals for iOS TopSongs URLCache XMLPerformance |
Creating and Initializing Date Objects
+ date
+ dateWithTimeIntervalSinceNow:
+ dateWithTimeInterval:sinceDate:
+ dateWithTimeIntervalSinceReferenceDate:
+ dateWithTimeIntervalSince1970:
– init
– initWithTimeIntervalSinceNow:
– initWithTimeInterval:sinceDate:
– initWithTimeIntervalSinceReferenceDate:
– initWithTimeIntervalSince1970:
Getting Temporal Boundaries
Comparing Dates
Getting Time Intervals
– timeIntervalSinceDate:
– timeIntervalSinceNow
+ timeIntervalSinceReferenceDate
– timeIntervalSinceReferenceDate
– timeIntervalSince1970
Adding a Time Interval
– dateByAddingTimeInterval:
– addTimeInterval:
Deprecated in iOS 4.0
Representing Dates as Strings
Copyright © 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-09-18

更多精彩