OCGeneric:Objective-C中的基础通用支持

时间:2021-05-21 20:23:36
【文件属性】:
文件名称:OCGeneric:Objective-C中的基础通用支持
文件大小:32KB
文件格式:ZIP
更新时间:2021-05-21 20:23:36
Objective-C OCGeneric Objective-C的基础通用支持。 包括OCGenerics.h 在NSArray中注册要使用的类 GENERIC ( NSString ) GENERIC( NSNumber ) 像这样声明一个伪造的NSMuatbleArray NSMutableArray ( NSString ) *strAry = [[NSMutableArray( NSString ) alloc] init]; NSMutableArray ( NSNumber ) *numberAry = [[NSMutableArray( NSNumber ) alloc] init]; 类型识别 当您要将NSNumber对象添加到NSString数组中时,Xcode将找出错误的类型 扩展名 您可以基于此进行扩展,方法是在OCGenerics.h中添加更
【文件预览】:
OCGeneric-master
----README.md(785B)
----OCGeneric()
--------OCGeneric.xcodeproj()
--------OCGeneric()

网友评论