runtiem开源地址:https://opensource.apple.com - - -https://opensource.apple.com/tarballs/objc4/
附:查看某文件夹下包含某字符的文件---grep "file" *
class_addMethod(Person, @selector(name), (IMP)nameGetter, "@@:");
这句话的意思是:为Person类添加一个oc函数name ,实现是nameGetter,返回值和参数是第三个类型
Table 6-1 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) |