(Just to let you now, I'm learning to develop for iPhone with a book I got called Beginning iPhone 3 Development: Exploring the SDK, and I do not use Interface builder) Is there ever a reason to use the getter in the same class, when a private member is visible? Like in Foo.h, having
NSObject *myObj;
...
@property (nonatomic, retain)NSObject *myObj;
and then in Foo.m, accessing the member myObj using self.myObj (or [self myObj]) ? Because in my book, Here is what it tells you to write in one of the apps (its checking if a UIViewController member's view is in the superview) :
if(self.yellowViewController.view.superview == nil) {
(notice the self.yellowViewController...) Is there actually a reason for this? If there isn't one idea I have is maybe because the member blueViewController is of class BlueViewController, so I think if there is no reason it may be to not cause confusion. So is there anytime where using the getter in the same class is needed?
Thanks!!