An array is equal to another array (isEqualToArray: selector) if they have the same objects (in the same order). This is checked using the isEqual: method (regardless of the variable array or not).
They are the same, one or the other initialization does not matter. Make sure this is the result of registering isEqualToArray :.
NSArray *originalArray = @[obj1, obj2, oj3]; NSMutableArray *newMutableArray = nil; newMutableArray = [NSMutableArray arrayWithArray:originalArray]; thereIsSomeDifference= ![newMutableArray isEqualToArray: [originArray mutableCopy] ];
Note that the comparison will be true even if you compare it with a non-volatile copy.
Ramy Al Zuhouri
source share