resently i met a problem that is when i use the method 'containObject:XX'. object 'XX' is existed in the array,and all properties of the two objects have the same values,though they have different address. i have caught the data using charles,and confirmed what i said just now. but the method 'containObject:XX' all the same, it makes me puzzled. anybody knows why? thanks.
NSArray *tempCouponArr = [NSArray arrayWithArray:_chosenCouponIndexPathArr];
for (CouponInfoModel *cim in tempCouponArr) {
if(![couponArr containsObject:cim])
{
[_chosenCouponIndexPathArr removeObject:cim];
_couponValue -= cim.price;
}
}
when i set a breakpoint i found that current object in couponArr is all the same with current cim without address. but it enter the condition statement that is not what i want.