Objective-C 类型编码
使用以下方法时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 Type Encodings
二.Objective-C Method Encodings
![](https://img.haomeiwen.com/i2204330/ca8446bab23d29d7.png)
Objective-C Method Encodings
参考文档:https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100-SW1
本文标题:Objective-C 类型编码
本文链接:https://www.haomeiwen.com/subject/zmbcyqtx.html
网友评论