I\'m new ios developer, I want to compare and change attributes
Array1 = (object1,object2, object3, object4) Array2 = (object2,object4, object5, object8)
Compare
I think you'll have to do a n*n
search in this case. Loop through every object in Array1, have a nested loop and compare every item in Array2 to the current object (in Array1). If they are equal then change your attribute.
for (int i = 0; i < [array1 count]; i++)
for (int j = 0; j < [array2 count]; j++)
if ([array1 objectAtIndex:i] == [array2 objectAtIndex:j]) {
// do yo thangs
}