Is it good practice to put private API in the .m files and public API in .h files in Cocoa?

Posted by Paperflyer on Stack Overflow See other posts from Stack Overflow or by Paperflyer
Published on 2010-03-29T17:14:39Z Indexed on 2010/03/29 17:23 UTC
Read the original article Hit count: 254

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.

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about best-practices