Questions tagged [cfdictionary]

CFDictionary and its derived mutable type, CFMutableDictionary Reference, manage associations of key-value pairs.

FDictionary and its derived mutable type, CFMutableDictionary Reference, manage associations of key-value pairs. CFDictionary creates static dictionaries where you set the key-value pairs when first creating a dictionary and cannot modify them afterward; CFMutableDictionary creates dynamic dictionaries where you can add or delete key-value pairs at any time, and the dictionary automatically allocates memory as needed.

A key-value pair within a dictionary is called an entry. Each entry consists of one object that represents the key and a second object that is that key’s value. Within a dictionary, the keys are unique. That is, no two keys in a single dictionary are equal (as determined by the equal callback). Internally, a dictionary uses a hash table to organize its storage and to provide rapid access to a value given the corresponding key.

Keys for a CFDictionary may be of any C type, however note that if you want to convert a CFPropertyList to XML, any dictionary’s keys must be CFString objects.

Apple Documentation

17 questions
0
votes
1 answer

pass dictionary key to CFDictionaryGetValue

I am getting a headache due to UnsafePointer in Swift. This is the method I want to call: func CFDictionaryGetValue(theDict: CFDictionary!, _ key: UnsafePointer) -> UnsafePointer And this is how I do it. let ds: SCDynamicStoreRef =…
potato
  • 4,479
  • 7
  • 42
  • 99
0
votes
1 answer

Swift CFDictionaryCreateMutable

I'm trying to create a PDF document in iOS using Quartz 2D. When I try to define a dictionary to set PDF metadata a get this error: Cannot invoke 'CFDictionaryCreateMutable' with an argument list of type '(CFAllocator!, Int,…
a0alv
  • 1
  • 4
1
2