CodeSmile
CodeSmile

Reputation: 64477

What are the Objective-C @property keywords in brackets like readonly referred to as?

@property (nonatomic, readonly) BOOL isBlabla;

When speaking about properties I'm not sure what the official name for the keywords in brackets like (nonatomic, retain) is. I have referred to them as "property modifiers" and other names but that's probably not the correct term.

How should I call this group of keywords (nonatomic, atomic, readonly, readwrite, assign, retain, strong, etc.) that can be used in the @property brackets so that everyone knows what I'm referring to?

Upvotes: 2

Views: 468

Answers (2)

Denis Kutlubaev
Denis Kutlubaev

Reputation: 16134

Referring to "Objective-C Programming Language" book from Apple in iBooks, they are called "set of attributes". Every single word is called "attribute". Also there is a paragraph in this book, called "Property Declaration Attributes".

Upvotes: 1

Chris Trahey
Chris Trahey

Reputation: 18290

In the closest book to me presently, they are called "property attributes" http://www.amazon.com/Programming-Objective-C-2-0-2nd-Edition/dp/0321566157

A quick search of Apple's docs yields the same word: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocProperties.html

And finally, the link to the specific section of the docs, which uses both "attributes" and your very own "keywords": https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocProperties.html#//apple_ref/doc/uid/TP30001163-CH17-SW2

Upvotes: 5

Related Questions