简体   繁体   English

方括号(如readonly称为)中的Objective-C @property关键字是什么?

[英]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? 我应该如何称呼这组关键字 (非原子,原子,只读,读写,分配,保留,强等),这些关键字可以在@property括号中使用, 以便每个人都知道我在说什么?

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 在目前最接近我的书中,它们被称为“属性属性” 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 快速搜索Apple文档会得到相同的单词: 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 最后,指向文档特定部分的链接,该链接同时使用“属性”和您自己的“关键字”: https : //developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/章/ 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". 参考iBooks中Apple的“ Objective-C编程语言”一书,它们称为“属性集”。 Every single word is called "attribute". 每个单词都称为“属性”。 Also there is a paragraph in this book, called "Property Declaration Attributes". 本书中还有一段称为“属性声明属性”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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