Hour 3. Using Object-Oriented Features in Objective-C
What You’ll Learn in This Hour
• Sending and receiving messages
• Looking inside a message
• Initializing objects
Communicating to Methods with Messages
Perhaps the biggest difference between Objective-C and languages such as C++ is its messaging syntax as well as the way people talk about it. Objective-C has classes just as other object-oriented languages do, and those classes can have methods within them. You communicate with those methods with messages. A message is enclosed within square brackets, and it consists of the name of the object to which it is being sent followed by the message itself.
The implementation files that you create carry the .m suffix because originally they were ...
Get Sams Teach Yourself Objective-C in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.