dateByAddingTimeInterval method availability
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.
精彩评论