Cocoa

See all tags

55 posts

Development

CFBag

The article explores the CFBag and CFMutableBag Core Foundation types, which implement a bag (multi-set) data structure, allowing multiple occurrences of elements with associated counts.

Development

CFStringTransform

NSString and its toll-free bridged counterpart CFMutableString in Foundation and Core Foundation are highlighted for their exceptional Unicode handling, with CFStringTransform enabling powerful string transformations like stripping diacritics, naming Unicode characters, and transliterating between scripts such as Latin, Cyrillic, and Hiragana.

Development

NSSortDescriptor

NSSortDescriptor is a Foundation class used to sort collections. It is created with a key (property to sort on), ascending (true for ascending order), and optionally a selector or comparator for comparisons.

Development

NSCache

NSCache works like NSMutableDictionary but removes objects automatically when memory runs low. This saves you from handling memory warnings or setting up timers to clear space.

Development

NSIndexSet

NSIndexSet and its mutable version, NSMutableIndexSet, form a sorted set of unique unsigned integers. They act like an NSRange that allows gaps.