After we use properties in our code, it seems like this:
The word "retain"in parenthesis the setter function: it should retain the input value. Rest of the line specifies type and name of the property. After this, the class definition as follow:
We can use setter an getter methods which are generate by the @synthesize directive. This directive is used to instantiate the property Also we use the dot syntax to set or get a value as we used.
With this example, we see properties are so powerful feature to use in our software developer. Next post will explain the attributes that a property can be have.
No comments:
Post a Comment