https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW6
Objective-C Type Encodings 属性类型编码
Code | Meaning |
---|---|
| A |
| An |
| A |
| A |
| A |
| An |
| An |
| An |
| An |
| An |
| A |
| A |
| A C++ |
| A |
| A character string ( |
| An object (whether statically typed or typed |
| A class object ( |
| A method selector ( |
[array type] | An array |
{name=type...} | A structure |
(name=type...) | A union |
| A bit field of num bits |
| A pointer to type |
| An unknown type (among other things, this code is used for function pointers) |
Objective-C method encodings 方法参数类型
Code | Meaning |
---|---|
| |
| |
| |
| |
| |
| |
| |
Property Type String (property_getAttributes)属性修饰符的编码
Code | Meaning |
---|---|
| The property is read-only ( |
| The property is a copy of the value last assigned ( |
| The property is a reference to the value last assigned ( |
| The property is non-atomic ( |
| The property defines a custom getter selector name. The name follows the |
| The property defines a custom setter selector name. The name follows the |
| The property is dynamic ( |
| The property is a weak reference ( |
| The property is eligible for garbage collection. |
| Specifies the type using old-style encoding. |