[arr enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop){
NSLog(@
"%ld,%@"
,idx,[arr objectAtIndex:idx]);
}];
dispatch_apply([arr count], dispatch_get_global_queue(
0
,
0
), ^(size_t index){
NSLog(@
"%ld,%@"
,index,[arr objectAtIndex:index]);
});
dispatch_apply([arr count], dispatch_get_main_queue(), ^(size_t index){
NSLog(@
"%ld,%@"
,index,[arr objectAtIndex:index]);
});
for
(NSString*str in arr) {
NSLog(@
"%@"
,str);
}
int
i =
0
;
do
{
NSLog(@
"%@"
,[arr objectAtIndex:i]);
i++;
}
while
(i<[arr count]);
int
j =
0
;
while
(j<[arr count]) {
NSLog(@
"%@"
,[arr objectAtIndex:j]);
j++;
}
for
(
int
m =
0
; m<[arr count]; m++) {
NSLog(@
"%@"
,[arr objectAtIndex:m]);
}