Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the last chapter, you sent a few messages. Let’s look again at the lines where you sent those messages and triggered the corresponding methods:
NSDate *now = [NSDate date];
We say that the date method is a class method. That is, you cause the method to execute by sending a message to the NSDate class. The date method returns a pointer to an instance of NSDate.
double seconds = [now timeIntervalSince1970];
We say that timeIntervalSince1970 is an instance method. You cause the method to execute by sending a message to an instance of the class. The timeIntervalSince1970 method returns a double.
NSDate *later = [now dateByAddingTimeInterval:100000];
dateByAddingTimeInterval: is another instance method. This method takes one argument. You can determine this by the colon in the method name. This method also returns a pointer to an instance of