cocoa - Objective-C properties -
i wondering, when accessing properties within class, have [self someproperty]
or self.someproperty
? or safe refer someproperty
?
edit: given name of property doesn't conflict/shawdow....
[self someproperty] or self.someproperty? or can safe refer someproperty?
any 1 fine. prefer not use self
when being in scope of class.
somevalue = 10 ; [ self somevalue ] = 20 ; self.somevalue = 30 ;
all above 3 statements going modify interface variable somevalue
.
Comments
Post a Comment