Search code examples
objective-ccore-foundation

Determining what a CFTypeRef is?


I have a function which returns CFTypeRef. I have no idea what it really is. How do I determine that? For example it might be a CFStringRef.


Solution

  • CFGetTypeID():

    if (CFGetTypeID(myObjectRef) == CFStringGetTypeID()) {
      //i haz a string
    }