|
#1
| ||||
| ||||
| CoreFoundation => Foundation
I have a CFDictionaryRef and want to make a NSDictionary out of it. Any suggestions on how to do it? The manual way is a possibility, but I rather have a nice little method somewhere, like +dictionaryWithCFDictionayRef: ... both the CoreFoundation and Foundation documentation seems to avoid this topic. theo/iconara |
|
#2
| ||||
| ||||
|
it's a pity having to answer one's own questions... this is the way to do it: Code: CFDictionaryRef cfDict = CFDictionaryCreate(...); NSDictionary *nsDict = (NSDictionary *)cfDict; Ugly. |
|
#3
| |||
| |||
|
That's why they call it "toll free bridging" you just cast the type (you shouldn't get any warnings: never got one).
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Upgrade XFree86 4.1 => XFree864.2 | bright | Mac OS X System & Mac Software | 1 | February 1st, 2002 07:37 AM |
| Attention Dave X and NetBarrier X => Kernel Panic !!! | Tuvok | Mac OS X System & Mac Software | 3 | December 12th, 2001 01:19 PM |