Alex Rivera | Logout

Defining properties in header file vs implementation file objective c

Asked 2011-12-13T15:17:07.073
8

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?

Edit
Report

1 Answer

13

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

answered 2011-12-13T15:18:19.553

Your Answer