OC方法积累
//适配ios7
if( ([[[UIDevicecurrentDevice] systemVersion] doubleValue]>=7.0))
遍历数组
[Array enumerateObjectsUsingBlock:^(id obj, NSUIneteger idx, BOOL *stop) {
NSLog(@”遍历: %@”, obj) ;
If (idx > 10) {
*stop = YES;
}
}];
是否包含obj
[array containsObject:obj];