NSSet or NSMutableSet will have no duplicate objects

725 Views Asked by At

I have a sprite class that inherits UIImageView and is used in my game scene alot.

I recently stopped using indented fast enumeration to compare objects with NSSet or NSMutableSet.

But it is possible for some sprites to have equal vars when they are at their spawn location. Won't this cause a problem?

Will the objects be seen as duplicates?

1

There are 1 best solutions below

0
On BEST ANSWER

If you mean that your objects will have the same frame or bounds properties - this is not enough to be considered equal so will not be treated as duplicates. You are safe.