Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Defining properties in header file vs implementation file objective c

Tags:

objective-c

In the page based application template, I am seeing this a lot in the implementation (.m) files.

@interface ModelController()
@property (readonly, strong, nonatomic) NSArray *pageData;
@end

Why isn't this done in the header (.h) file?

like image 971
Chris Muench Avatar asked Dec 13 '11 15:12

Chris Muench


1 Answers

This property is in the implementation file because it does not need to be declared publicly and only used within the .m file.

like image 62
Sean Avatar answered Oct 05 '22 10:10

Sean