摘要: 创建dispatch组dispatch_group_t group = dispatch_group_create(); 手动管理group关联的block的运行状态(或计数),进入和退出group次数必须匹配dispatch_group_enter(group);dispatch_group_le... 阅读全文
posted @ 2015-09-16 17:55 Volley 阅读(1191) 评论(0) 推荐(0) 编辑
摘要: #import #import @interface ScanBarViewController : UIViewController{ int num; BOOL upOrdown; NSTimer * timer;}@property (strong,nonatomic)AVCaptureDev... 阅读全文
posted @ 2015-04-27 10:47 Volley 阅读(123) 评论(0) 推荐(0) 编辑
摘要: NSDate *today = [[NSDate alloc] init]; NSCalendar *cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; NSDateCompon... 阅读全文
posted @ 2015-04-23 11:06 Volley 阅读(368) 评论(0) 推荐(0) 编辑
摘要: //第一种,利用数组的sortedArrayUsingComparator调用 NSComparator ,obj1和obj2指的数组中的对象 NSComparator cmptr = ^(id obj1, id obj2){if ([obj1 integerValue] > [obj2 integ... 阅读全文
posted @ 2014-12-24 18:14 Volley 阅读(270) 评论(0) 推荐(0) 编辑
摘要: NSSortDescriptor 指定用于对象数组排序的对象的属性。如果是Employee对象需要按照name来排序,就生成下面的descriptorNSSortDescriptor*descriptor = [NSSortDescriptorsortDescriptorWithKey:nameas... 阅读全文
posted @ 2014-12-04 22:47 Volley 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 例如: NSString *string = @"abavavasdsvx,as.dsf/,.[abcdefghijklmn]dgdfg"; NSRange start = [string rangeOfString:@"["]; NSRange end = [string ra... 阅读全文
posted @ 2014-10-23 17:30 Volley 阅读(252) 评论(0) 推荐(0) 编辑