开发者

dateByAddingTimeInterval method availability

开发者 https://www.devze.com 2023-03-11 02:38 出处:网络
I use dateByAddingTimeInterval method. I checked this method on iPhone with iOS 3.1开发者_Go百科 and it\'s worked! But in documentation said that this method available in iOS 4.0. Why this method work

I use dateByAddingTimeInterval method. I checked this method on iPhone with iOS 3.1开发者_Go百科 and it's worked! But in documentation said that this method available in iOS 4.0. Why this method worked in iOS 3.1?


It looks like an error in the documentation. The header specifies:

- (id)dateByAddingTimeInterval:(NSTimeInterval)ti NS_AVAILABLE(10_5, 2_0);

So it's available in 10.5, and iOS 2.0. That's why it is present in iOS 3 and later.

0

精彩评论

暂无评论...
验证码 换一张
取 消