Hello, i have a little programming background but I am new to Objective-C
I have a question regarding the @property NSArray *assest, and instance NSMutableArray.
If we add // (comment ) to the property of NSArray the code works fine, so basically all we are using is the NSMutableArray, which is hidden to the outside world. So why did he add the @property NSArray anyway? am i missing something? why do i need to tell other classes that i have NSArray named assets?
I feel stuck at this line and I really can’t help of thinking for a reason.
Chapter 21 is all about instance variables and properties.
The assets property is an example of a property of type NSArray backed by an instance of NSMutableArray class.
If the property is not being used, removing it does not stop your program from being compiled. (That property will be used later on - I am guessing here because I don’t have the 2nd Edition of the book.)
What do you mean when you say “backing up”, because this would make sense to me if we are actually using it as a peel to the user when he can’t see the behind instance variable NSMutableArray. But here were are not using @property.