I\'m a relative newbie to Objective-C (only studied Arron Hillegras\'s book) and am confused by the following snippit of code I\'ve found in one of Apple\'s code examples, i
You use ->
when you want to access an ivar. Like C structures you will use a .
or ->
(in pointers to structs) in Objective-C objects you can use ->
but is not necessary since you can access them directly.
Hence:
self->_numbers = [numbers copy];
and
_numbers = [numbers copy];
are the same
You want to use ->
when you want to access that ivar explicitly.
Be aware that in Objective-C you can use .
but only when its a property.
You can use ->
regardless that.