Property (nonatomic,copy) NSString *propertyname; Self.propertyname is a call to a property, and _propertyname is a call to a partial variable. In its 1, @property declaration, the compiler is born G]
@property (nonatomic,copy) NSString *propertyname;
Self.propertyname is the access to the attribute;
_propertyname is access to local variables.
In one, @property declaration, the compiler has a priority when generating the Getter,setter method, first locating the Getter,setter method of whether the user has defined the property in the current class, and, if so, the compiler skips and no longer builds, using a user-defined method.
This means that you are calling a getter method when you are using Self.propertyname.
Self.propertyname will let the counter +1;
Second, _propertyname, is the direct call variable, not through Getter method.
_propertyname is similar to Self->_propertyname.
Using Self.propertyname is a better choice because it is compatible with lazy loading and avoids the use of underscores when ignoring the self, which makes it easy to create circular references in blocks.
At the same time, using _ is not a property of the parent class, because it is only access to local variables.
Finally, the self method is actually called indirectly by the Get and set methods, and the underscore method is to manipulate the variables directly.
Differences between SELF.XXX and _xxx underline in iOS