Objective-C 类型编码
2019-02-20 本文已影响2人
May_Dobin
使用以下方法时type参数释义:
+ (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type;
+ (nullable NSMethodSignature *)signatureWithObjCTypes:(const char *)types;
例如
[NSMethodSignature signatureWithObjCTypes:"v@?"];
一.Objective-C Type Encodings
![](https://img.haomeiwen.com/i2204330/c0bc892f04c6ae39.png)
二.Objective-C Method Encodings
![](https://img.haomeiwen.com/i2204330/ca8446bab23d29d7.png)