iOS, Objective-C, Swift, Design and Whatever Comes in Mind
‹ Back to the Blog

Overlooked API of the Day: NSCountedSet

Have you ever encountered the issue where you had a sequence of things, you needed the elements only once and must know what elements are duplicates? And how often they occure?

Take a look as NSCountedSet! For example when combining multiple collections (Sets), you can determine which elements are contained multiple times. That technique can be used to calculate the intersection of collections in a straight foreward way 🙃

Apples documentation can be found here.

"Overlooked API of the Day: NSCountedSet".