Implementing Car Methods

Together, a header file and an implementation file store all the information needed to implement a class and use it with the rest of an application. The implementation source code is usually contained in an .m (either for implementation or method) file. As the name suggests, the methods file of a class provides the implementation of the methods and how the class will carry out its functionality.

In a larger class, in addition to the methods defined in the .h file, you would likely implement other supporting non-public methods. Unlike public methods, you do not need to declare the private methods before you define them. The compiler is smart enough to figure out where private methods are, even if you implement them after ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming 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.