2

/* Variable declared in @interface of .m file */

@interface ClassA () {
    NSMutableArray *mDocuments;
}

/* Variable declared in @implementation of .m file */

@implementation ClassA () {
    NSMutableArray *mDocuments;
}

1 Answers1

2

Declaring a variable in @interface is so it can be seen by other files, so a public declaration.

Declaring a variable in @implementation is private to the file.

See this thread for more in-depth: Private ivar in @interface or @implementation

Community
  • 1
  • 1
David P
  • 607
  • 1
  • 15
  • 26