November 2013
Beginner
325 pages
9h 47m
English
By now, you have used properties in many programs. In this chapter, you will learn a few more things about properties and what you can make them do.
First let’s take a closer look at the different attributes you can use to control how the accessors will be created.
A property can be declared readwrite or readonly. The default is readwrite, which means that both a setter and a getter method are created. If you do not want a setter method to be created, you mark the property as readonly:
@property (readonly) int voltage;
A property can also be declared unsafe_unretained, assign, strong, weak, or copy. This option determines ...
Read now
Unlock full access