November 2013
Beginner
325 pages
9h 47m
English
Objects are very chatty by nature. They send and receive lots of messages about the work they are doing. In this chapter, you will learn about messages with arguments, nested message sends, and more.
The TimeAfterTime program has an NSDate initialized to the date and time at which it is created. What if you want to represent a date in the future – say, 100,000 seconds from the first date? You can create such a date by sending the dateByAddingTimeInterval: message to the original instance of NSDate.
Notice the colon at the end of the dateByAddingTimeInterval: method’s name. This tells you that dateByAddingTimeInterval: accepts an argument. Methods, like functions, can have ...
Read now
Unlock full access