O'Reilly logo

Objective-C Memory Management Essentials by Gibson Tang, Maxim Vasilkov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The property attribute in Objective-C

If you have been doing some Objective-C programming, you would have come across the following syntax:

@property (nonatomic, readonly) UIView *rearView;
or
@property (nonatomic, retain) UIActivityIndicatorView *loadingView;

Now, I would bet that you would generally have a foggy idea of what terms such as nonatomic or retain mean when you are assigning these properties such as nonatomic and so on to your objects. These keywords, such as nonatomic or readonly, actually define the properties of your objects, which are used in the getter and setter methods automatically created for you in Xcode. These terms are coding keywords related to memory management and access control and were not created just to baffle you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required