What's the difference?
In my context, I need to be able to dynamically add to and remove objects. The user clicks on rows of a table that check on and off and thus add or remove the referenced object from the list.
A wild guess is that array has indexed items while set has no indexes?
An NSSet
/NSMutableSet
doesn't keep items in any particular order. An NSArray
/NSMutableArray
does store the items in a particular order. If you're building a table view, you should definitely use an array as your data source of choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With