标签:
28、使用block 块遍历整个数组。这个block 需要三个参数,id obj 表示数组中的元素。NSLog(@"%@",test);
37、指定区域返回通过代码块方法的索引
typedef NS_OPTIONS(NSUInteger, NSBinarySearchingOptions) {
NSBinarySearchingFirstEqual = (1UL <<8),
NSBinarySearchingLastEqual = (1UL <<9),
NSBinarySearchingInsertionIndex = (1UL <<10),
};
- (NSUInteger)indexOfObject:(id)obj inSortedRange:(NSRange)r options:(NSBinarySearchingOptions)opts usingComparator:(NSComparator)cmp NS_AVAILABLE(10_6,4_0); // binary search
标签:
原文地址:http://www.cnblogs.com/hxwj/p/4623571.html