Is it good practice to put private API in the .m files and public API in .h files in Cocoa?
- by Paperflyer
Many of my classes in my current project have several properties and methods that are only ever called from within the class itself. Also, they might mess with the working of the class depending on the current state of the class.
Currently, all these interfaces are defined in the main interface declaration in the .h files. Is it considered good practice to put the “private” methods and properties at the top of the .m files?
This won't ever affect anything since I am very likely the only person ever to look at this source code, but of course it would be interesting to know for future projects.