2012-07-22 140 views
1

是否有可能得到NSString的值爲kIconServices128PixelDataARGB,這意味着:@"ic07"從枚舉值NSString

enum { 
    kIconServices16PixelDataARGB = 'ic04', /* uses kSmall32BitIconIndex and kSmallDeepMaskIconIndex*/ 
    kIconServices32PixelDataARGB = 'ic05', /* uses kLarge32BitIconIndex and kLargeDeepMaskIconIndex*/ 
    kIconServices48PixelDataARGB = 'ic06', /* uses kHuge32BitIconIndex and kHugeDeepMaskIconIndex*/ 
    kIconServices128PixelDataARGB = 'ic07' /* uses kThumbnailDataIndex and kThumbnailMaskIndex*/ 
}; 

回答

1

有一些API使得這種轉換更簡單,例如, UTCreateStringForOSType()返回CFStringRef(您可以將它們轉換爲NSString*,因爲它們相同),或者在QTKit中有QTStringForOSType()

+0

工作,謝謝! – keegan3d 2012-07-23 00:05:19