关于array objectAtIndex 出来的model 的内存地址的注意
2015-06-18 16:50
483 查看
在tableview 的数据 我们经常用到array 去存数据
然后再 objectAtIndex 个model 出来
这个时候在VC里面改动 model 的属性的话 因为 model 是共用指向了array 的内存地址
所以不需要再 [Array replaceObjectAtIndex:0 withObject:model];
然后再 objectAtIndex 个model 出来
这个时候在VC里面改动 model 的属性的话 因为 model 是共用指向了array 的内存地址
所以不需要再 [Array replaceObjectAtIndex:0 withObject:model];
相关文章推荐
- 安卓 属性动画 ValueAnimator ObjectAnimator 源码分析 关键处
- Objective-C关键字和概念
- Objective-C中的+initialize和+load
- Swift vs Objective-C:未来看好 Swift 的十个理由
- Objective-C代码块语法(block)使用
- 理解Objective-C Runtime (六)super
- 理解Javascript_09_Function与Object
- Objective-C----init
- Objective-C----new
- Objective-C----实例变量
- 理解Objective-C Runtime (五)协议与分类
- 理解Objective-C Runtime(四)Method Swizzling
- Objective-C-实例变量与属性的关系
- Objective-C编码规范
- 升级Xcode之后VVDocumenter-Xcode不能用的解决办法
- [Objective-C]关联(objc_setAssociatedObject、objc_getAssociatedObject、objc_removeAssociatedObjects)
- 理解Objective-C Runtime(三)消息转发机制
- error while loading shared libraries: libseaudit.so.4: cannot open shared object file: Error 40
- Objective C属性
- Objective C面向对象