码迷,mamicode.com
首页 >  
搜索关键字:nsmutablearray    ( 568个结果
NSMutableArray
NSMutableArray 是一个可变数组,是NSArray的子类,但是不可以添加空值 创建NSMutableArray的方法 +(id)arrarWithCapacity:(NSInteger)numItems -(id)initWithCapacity:(NSInteger)numItems ...
分类:其他好文   时间:2015-06-02 19:27:18    阅读次数:137
关于数组在遍历过程中修改问题
问题描述:当我们需要通过遍历数组过滤的时候,一般会考虑以下写法,这种写法 会引起crash*** Collection was mutated while being enumerated. 1 NSMutableArray *mutableArray = [[NSMutableArray all....
分类:编程语言   时间:2015-06-02 13:05:17    阅读次数:133
array=nil 和 Array=[[NSMutableArray alloc]init]; 的区别
情况1:array=nil;[_PayArray addObject:BillDetail];此时array还是nil:因为array没有分配地址应该。情况2:Array=[[NSMutableArray alloc]init];[_PayArray addObject:BillDetail];此时...
分类:其他好文   时间:2015-06-02 00:02:03    阅读次数:299
[oc学习笔记]数组的遍历和排序
1 //数组的遍历(可变数组举例) 2 //for遍历 3 NSMutableArray *aa = [NSMutableArray array]; 4 [aa addObjectsFromArray:@[@"ss",@"ddd",@...
分类:编程语言   时间:2015-06-01 18:37:07    阅读次数:246
OC冒泡排序
NSMutableArray *p = [[NSMutableArray alloc] initWithObjects:@"3",@"5",@"4",@"1",@"7",@"6",@"4",nil]; for (int i = 0; i b) { [p replaceObjectAtIndex:i....
分类:编程语言   时间:2015-05-31 21:24:09    阅读次数:127
ios下拉菜单tableview的实现
ActivitiesViewController.h里面{ BOOL bol;//判定优惠券下拉菜单的开关}@property(retain,nonatomic)NSMutableArray *array;@property (retain, nonatomic)UIView *aselectvi....
分类:移动开发   时间:2015-05-30 16:35:31    阅读次数:217
UITextField中文搜索
导入头文件#import "ChineseInclude.h"#import "PinYinForObjc.h" NSMutableArray *searchResults;//可变数组,添加搜索到的数据设置数据源- (NSArray *)dataArray { if (!_dataAr...
分类:其他好文   时间:2015-05-29 20:18:50    阅读次数:124
tabview分组。仿qq列表
代码如下#import "ViewController.h"#import "JRProvince.h"@interface ViewController ()/** 省份数据数组*/@property(nonatomic,strong) NSMutableArray * province;/** ...
分类:其他好文   时间:2015-05-26 21:16:51    阅读次数:173
经常看到用[@[] mutableCopy]创建NSMutableArray,但未必好
The following should be avoided: NSMutableArray?*aMutableArray?=?[@[]?mutableCopy]; The problems with the previous notation are both of efficiency and readability. On the efficiency side, an un...
分类:其他好文   时间:2015-05-26 12:53:33    阅读次数:122
UITableView---分组 省份城市列表+ 右列索引
UITableView分组显示省份城市列表+右侧索引 例题:分组名为省份名称,组内容为对应省份的城市名称,点击右边的索引,将对应的省份分组显示到到第一行。 显示效果如下: 对应plist文件如下图所示: #import "ViewController.h" //遵守协议 @interface Vie...
分类:其他好文   时间:2015-05-25 13:06:51    阅读次数:209
568条   上一页 1 ... 32 33 34 35 36 ... 57 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!