ios Array 数组的valueForkeypath 快速的处理以及数组的拆分
来源:互联网 发布:mac系统修复软件 编辑:程序博客网 时间:2024/06/14 16:10
http://www.jianshu.com/p/e71cec144966
确实很方便
-(void)splitArray{
if(self.unReadmsgModule){
if (self.module.showingMessages.count>self.unReadmsgModule.unReadmsgCount) {
NSIndexSet * unreadIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(self.module.showingMessages.count-self.unReadmsgModule.unReadmsgCount, self.unReadmsgModule.unReadmsgCount)];
NSIndexSet * readIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, self.module.showingMessages.count-self.unReadmsgModule.unReadmsgCount)];
self.module.unReadMsgArray = [[NSMutableArray alloc]initWithArray:[self.module.showingMessages objectsAtIndexes:unreadIndexSet]];
self.module.readMsgArray = [[NSMutableArray alloc]initWithArray:[self.module.showingMessages objectsAtIndexes:readIndexSet]];
}else{
self.module.unReadMsgArray = self.module.showingMessages;
}
}
数组的拆分
- ios Array 数组的valueForkeypath 快速的处理以及数组的拆分
- valueForKeyPath的使用小结
- valueForKeyPath的使用
- 字符串数组容易搞混的方法以及地址拆分
- iOS array数组常用的方法
- C#数组的合并拆分
- C# 拆分数组的方法
- C#数组的合并拆分
- 数组的拆分函数array_chunk()
- 数组的合并与拆分
- iOS 空数组的处理
- Array数组的应用
- js的Array数组
- JS 的数组 ARRAY
- array数组的使用
- 数组Array的方法
- 数组Array的应用
- js的Array数组
- keras修改backend
- 链表归并排序
- Mybatis的接口映射、接口的注解映射和自定义传参
- sql之left join、right join、inner join的区别
- iOS实现从后台切换到前台有毛玻璃效果
- ios Array 数组的valueForkeypath 快速的处理以及数组的拆分
- Java线程同步--synchronized的用法
- shell ——find
- 关于Java中equal函数和==的一些区别
- 简单web搭建
- 浅谈c++类成员的三种访问控制方式和类继承派生时的三种继承方式
- JAVA-去掉LIST中重复值
- 未来币-概念介绍-货币系统 Monetary System
- JS中定义对象的几种方式