Where is NSDate dateByAddingTimeInterval on iPhone OS?

Hello! I have to see things. Check out this excerpt from the iPhone OS help library :

addTimeInterval: Returns a new NSDate object that is set for a given number of seconds relative to the receiver. (Deprecated. This method has been replaced by dateByAddingTimeInterval:. )

However, it is nowhere to be found in documents or in headings. If I look at the Mac OS SDK, I will find it.

Typo? Just keep using addTimeInterval: .

+5
source share
3 answers

. addTimeInterval: Mac OS X 10.6, iPhone OS 3.1.2.

NSDate.h MacOS iPhoneOS, .

NSDate.h iPhone OS

- (id)addTimeInterval:(NSTimeInterval)seconds;

NSDate.h Mac OS 10.6

- (id)addTimeInterval:(NSTimeInterval)seconds DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER;
- (id)dateByAddingTimeInterval:(NSTimeInterval)ti AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
+11

, , . , , , , .

+1

addTimeInterval is now deprecated in iOS 4.

0
source

All Articles