I was going over a sample Cocoa app from Apple (ImageKitDemo) and noticed that one of the source files (the .m file) actually contains the definition (interface and implementation) of another class. What are the benefits of doing this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It also has the added benefit of emphasizing the fact that a certain class is only intended to serve as an implementation detail of another class, and should not be used elsewhere.