yllan

Nowhere differentiable curve

1 note

Another possible catch about NSIndexPath

Since NSIndexPath is not unique and shared, we cannot test the equality using ==. However, according to someone’s experience, using isEqual: to test the equality of two NSIndexPaths may be wrong due to a bug which had been fixed in iOS 5.

That is, if you want to target old system, you’d better not invoke isEqual: or use NSIndexPath as a key in NSSet or NSDictionary.

I didn’t encounter this situation in iOS 4.3/5 but I don’t know in which version Apple had fixed this bug. Anyone can confirm that if this bug only exists in iOS beta version?

  1. yllan posted this