struct 转对象(NSValue)
来源:互联网 发布:行情数据接口 编辑:程序博客网 时间:2024/05/20 12:50
1.struct aStruct{ int a; int b;};typedef struct aStruct aStruct;
2.aStruct struct; struct.a = 0; struct.b = 0;
NSValue *anObj = [NSValue value:&struct withObjCType:@encode(aStruct)];NSArray *array = [NSArray arrayWithObjects:anObj, nil];
3.
NSValue *anObj = [array objectAtIndex:0];aStruct struct;[anObj getValue:&struct];
0 0
- struct 转对象(NSValue)
- NSValue【转】
- Objective-C--- NSValue 详解 struct 结构体
- NSMutableArray中存放struct以及NSValue详解
- 由Struct到NSData和NSValue
- NSValue 结构体转化位对象(包装结构体)
- iOS-值对象NSValue介绍
- NSValue(添)
- NSValue 使用(十二)
- NSValue
- NSValue
- NSValue
- NSValue
- NSValue
- NSValue
- NSValue
- NSValue
- NSValue
- Avr-Gcc中关于delay函数的应用
- 图像处理之直方图计算
- jQuery与jQuery ui学习
- jquery列表的过滤示例
- 带缓存的HTTP代理服务器(六)
- struct 转对象(NSValue)
- linux ./configure 的参数详解
- 全角半角都是角人妖分分姑人都是软性
- 写几个简单的延时函数
- 数据结构 树
- php过滤替换特殊字符 函数
- 我的git 常用指令
- Sqlite 的String 自动转成数字原因分析。。
- POJ 1789 Truck History 最小生成树