Determining what a CFTypeRef is?

后端 未结 3 1115
野趣味
野趣味 2021-01-04 17:08

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

3条回答
  •  旧时难觅i
    2021-01-04 17:48

    CFGetTypeID():

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

提交回复
热议问题