ivar_getTypeEncoding

官方的 ivar_getTypeEncoding/ property_getAttributes(property) 返回说明
 c

 A char

 I

 An int

 s

 A short

 l

 A long

 l is treated as a 32-bit quantity on 64-bit programs.

 q

 A long long

 C

 An unsigned char

 I

 An unsigned int

 S

 An unsigned short

 L

 An unsigned long

 Q

 An unsigned long long

 f

 A float

 d

 A double

 B

 A C++ bool or a C99 _Bool

 v

 A void

 \*

 A character string (char *)

 @

 An object (whether statically typed or typed id)

 #

 A class object (Class)

 :

 A method selector (SEL)

 [array type]

 An array

 {name=type...}

 A structure

 (name=type...)

 A union

 bnum

 A bit field of num bits

 ^type

 A pointer to type

 ?

 An unknown type (among other things, this code is used for function pointers)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。