Pregunta

Just wondering if Cocoa provides constants for standard UTIs? At the moment I'm using Pboard types defined in NSPasteboard.h, but they're marked as slated for deprecation in the comments. Are there constants I should be using for UTIs instead, or do I just hardcode the NSString values in my app?

¿Fue útil?

Solución

UTCoreTypes.h contains a bunch of UTI definitions, they are CFStringRef but are NSString toll free

take a look at TextEdit example to see some UTI usage like kUTTypeText, kUTTypeRTF and so on

Or see the UTType Reference

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top