Where are the image files for constants in NSImage?

I would like to get image files for constants defined in NSImage.h for example NSImageNameGoRightTemplate

. I would like to copy and edit some of them. Does anyone know where these images are? I'm too stupid to find them on disk ...

+2


a source to share


2 answers


As far as I know, they are not located in the same place, and their names may not reflect the name of the constants at all.

They can be located in the "Resources" folder of the framework, for example

/System/Library/Frameworks/AppKit.framework/Resources/

      



or directly in the application, for example

/System/Library/CoreServices/Finder.app/Contents/Resources/

      

You can also take a look at a themed app like CandyBar. You might be able to see some of the paths in binary.

+1


a source


I use a category with this array if I want to "auto-generate" a bunch of "silly" images ...



@implementation NSImage (SystemImages)

+ (NSArray*) systemImages { static NSArray *images;

    return images = images ?: ({ NSMutableArray *imgs = @[].mutableCopy;

    for (id name in @[            
        NSImageNameQuickLookTemplate,
        NSImageNameBluetoothTemplate,
        NSImageNameIChatTheaterTemplate,
        NSImageNameSlideshowTemplate,
        NSImageNameActionTemplate,
        NSImageNameSmartBadgeTemplate,
        NSImageNameIconViewTemplate,
        NSImageNameListViewTemplate,
        NSImageNameColumnViewTemplate,
        NSImageNameFlowViewTemplate,
        NSImageNamePathTemplate,
        NSImageNameInvalidDataFreestandingTemplate,
        NSImageNameLockLockedTemplate,
        NSImageNameLockUnlockedTemplate,
        NSImageNameGoRightTemplate,
        NSImageNameGoLeftTemplate,
        NSImageNameRightFacingTriangleTemplate,
        NSImageNameLeftFacingTriangleTemplate,
        NSImageNameAddTemplate,
        NSImageNameRemoveTemplate,
        NSImageNameRevealFreestandingTemplate,
        NSImageNameFollowLinkFreestandingTemplate,
        NSImageNameEnterFullScreenTemplate,
        NSImageNameExitFullScreenTemplate,
        NSImageNameStopProgressTemplate,
        NSImageNameStopProgressFreestandingTemplate,
        NSImageNameRefreshTemplate,
        NSImageNameRefreshFreestandingTemplate,
        NSImageNameBonjour,
        NSImageNameComputer,
        NSImageNameFolderBurnable,
        NSImageNameFolderSmart,
        NSImageNameFolder,
        NSImageNameNetwork,
        NSImageNameDotMac,
        NSImageNameMobileMe,
        NSImageNameMultipleDocuments,
        NSImageNameUserAccounts,
        NSImageNamePreferencesGeneral,
        NSImageNameAdvanced,
        NSImageNameInfo,
        NSImageNameFontPanel,
        NSImageNameColorPanel,
        NSImageNameUser,
        NSImageNameUserGroup,
        NSImageNameEveryone,
        NSImageNameUserGuest,
        NSImageNameMenuOnStateTemplate,
        NSImageNameMenuMixedStateTemplate,
        NSImageNameApplicationIcon,
        NSImageNameTrashEmpty,
        NSImageNameTrashFull,
        NSImageNameHomeTemplate,
        NSImageNameBookmarksTemplate,
        NSImageNameCaution,
        NSImageNameStatusAvailable,
        NSImageNameStatusPartiallyAvailable,
        NSImageNameStatusUnavailable,
        NSImageNameStatusNone])
    [imgs addObject:[NSImage imageNamed:name]];
    imgs.copy; 
  });
}
@end

      

+1


a source







All Articles