简体   繁体   中英

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?

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

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".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM