如果你不是在同一个view中使用多个mapview的话 ,都可以采用先清理掉原来数据 再加载新数据的方式来实现清理 数据NSArray* array = [NSArray arrayWithArray:_mapView.annotations]; for (MapPointAnnotion* ann
分类:
其他好文 时间:
2016-03-03 19:17:18
阅读次数:
212
int main(int argc, const char * argv[]) { @autoreleasepool { //字符串进行排序 NSArray *arr=@[@"b",@"a",@"c"]; NSSortDescriptor *ns=[NSSortDescriptor sortDesc
分类:
编程语言 时间:
2016-03-03 14:44:02
阅读次数:
174
1、在Documents里创建目录
创建一个叫test的目录,先找到Documents的目录,
[cpp] view
plain copy
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSStr...
分类:
移动开发 时间:
2016-03-03 01:46:22
阅读次数:
252
-(void)testStr:(NSString *)str{ NSArray *array=@[@"鼠_4",@"牛_5",@"虎_6",@"兔_7",@"龙_8",@"蛇_9",@"马_10",@"羊_11",@"猴_0",@"鸡_1",@"狗_2",@"猪_3"]; for (int i=0;
分类:
移动开发 时间:
2016-03-03 00:01:53
阅读次数:
218
tableview中的cell和底下的线 1 // 刷新指定行数据 2 NSIndexPath *indexPath=[NSIndexPath indexPathForRow:0 inSection:0]; 3 [tab reloadRowsAtIndexPaths:[NSArray arrayWi
分类:
其他好文 时间:
2016-03-02 13:09:35
阅读次数:
142
#import "ViewController.h" #import "Appfz.h"@interface ViewController ()@property(nonatomic,copy)NSArray *apps;//文件读取@property(nonatomic,assign)BOOL b
分类:
其他好文 时间:
2016-03-02 09:31:21
阅读次数:
150
/** * 要求计算一个文件中所有文件的大小 注意:必须先计算一个文件夹中所有文件的大小必须先拿到所有文件,然后再获取所有文件的大小,然后相加 */ NSFileManager *manager=[NSFileManager defaultManager]; //提取要求计算的文件 NSArray
分类:
其他好文 时间:
2016-03-01 14:31:13
阅读次数:
140
题照 1、对数组中的元素去重复 例如: 1 2 3 NSArray *array = @[@"12-11", @"12-11", @"12-11", @"12-12", @"12-13", @"12-14"]; 参考答案: 第一种方法:开辟新的内存空间,然后判断是否存在,若不存在则添加到数组中,得到
分类:
移动开发 时间:
2016-03-01 12:39:09
阅读次数:
336
1 #import "RootViewController.h" 2 3 @interface RootViewController ()<UITableViewDataSource,UITableViewDelegate> 4 @property(nonatomic,strong)NSArray
分类:
其他好文 时间:
2016-02-29 21:42:48
阅读次数:
272
1.子母排序 NSArray *kArrSort = [_dic allKeys]; //这里是字母数组:,g,a,b.y,m…… NSArray *resultkArrSort = [kArrSort sortedArrayUsingComparator:^NSComparisonResult(i
分类:
编程语言 时间:
2016-02-29 14:38:27
阅读次数:
152