I have this NSArray:
NSArray* temp=[[NSArray alloc]
initWithObjects:@"one",@"five",@"two",nil];
for(NSString* obj in temp){
NSLog(@"current item:%@ Next item is:%@",obj, ***blank***);
}
What needs to replace blank? Do I need to know the upcoming object?
This only works if your objects are unique (i. e. there are no identical objects in the array):
But in my opinion, this is a hack. Why not use a normal for loop with the index of the object:
Or (recommended) enumerate it using a block