Using @property & instance var. w/ different type


#1

If BNREmployee.h we did the following:
(1) explicitly declared an instance variable: NSMutableArray *_assets
(2) used the @property: @property NSArray (nonatomic, copy) NSArray *assets;

If I have:
NSMutableArray *employees = [[BNREmployee alloc] init];

I can send the message (assuming I’ve already filled the employees array & gave them some assets):
[employees[0] assets]

But I can’t use the dot-notation:
employees[0].assets

I thought the dot-notation sends the message:
[employees[0] assets].

Maybe this is a small detail, but I would appreciate if someone can explain it.


#2

Try declaring your variable as BNREmployee *employees = [[BNREmployee alloc] init];
Then you should be able to access the employees.assets property.