我想獲得在NSImage.h中定義的常量的圖像文件,例如NSImageNameGoRightTemplate
。我想複製和編輯其中的一些。有人知道這些圖像的位置嗎?我太愚蠢,找不到他們的驅動器...NSImage中常量的圖像文件位於哪裏?
2
A
回答
1
據我所知,他們不位於一個地方,他們的名字可能並不反映在所有常數的名稱。
它們可以位於框架的「資源」文件夾,如
/System/Library/Frameworks/AppKit.framework/Resources/
在應用程序
或直接,就像
/System/Library/CoreServices/Finder.app/Contents/Resources/
您還可以看看一個主題化應用像CandyBar一樣。也許你會在二進制文件中看到一些路徑。
1
我用一個類別與此陣,如果我要「自動生成」一堆「笨」圖片...
@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
+0
爲什麼你添加每張圖片1000次?沒有足夠的時間添加它? – mah 2014-10-20 13:16:21
+2
@mah我不知道...一些身體掠奪者留下了那個愚蠢的答案。這是一個稍微不那麼愚蠢的編輯,至少是一個實際的類別,哈哈。 – 2014-10-28 03:44:58
相關問題
- 1. %Jupyter文件位於哪裏?
- 2. NSFetchedResultsController的緩存文件位於哪裏?
- 3. 位於JDK文件夾中的類文件在哪裏?
- 4. FileSystem API:位於哪裏的文件和文件夾
- 5. 張量流CIFAR10教程:圖像文件保存在哪裏?
- 6. 哪裏位於ArchLinux的
- 7. 位於文件系統中的iOS內核在哪裏?
- 8. KDE5中的鼠標配置文件在哪裏Debian Stretch位於
- 9. 位於Intellij IDEA中的戰爭文件在哪裏?
- 10. 位於iPhone SpeakHere示例中的錄音文件在哪裏?
- 11. 哪裏按位圖
- 12. 哪裏有關於遊戲常量的文檔?
- 13. .gitignore文件屬於哪裏?
- 14. PHP函數位於哪裏? (如在哪個文件)
- 15. iOS4.2的本地文檔內容文件位於哪裏?
- 16. 把Django中的css文件調用的圖像放在哪裏?
- 17. Android常量在哪裏?
- 18. Xcode 8中的symbolicatecrash位於哪裏?
- 19. 在Business Catalyst中,博客文件位於哪裏?
- 20. jsoncallback位於哪裏?上述
- 21. phpmyadmin位於plesk在哪裏?
- 22. eclipse.ini文件的位置在哪裏?
- 23. QSettings - ini文件的位置在哪裏?
- 24. 位於文件管理器中的Magento主頁文件在哪裏?
- 25. php的擴展名爲.so的文件位於哪裏?
- 26. 我的離線JSBin文件位於哪裏?
- 27. 位於Ubuntu上的Cherrypy配置文件在哪裏?
- 28. 位於Moodle的日誌文件在哪裏?
- 29. 位於Linux Red Hat的「.htacess」apache文件在哪裏?
- 30. 回購的自動構建文件位於哪裏
謝謝您的回答。 我在/System/Library/Frameworks/Quartz.framework/Frameworks/ImageKit.framework/Versions/A/Resources中發現了很多圖片。按照您的建議,Finder包中還有很多。但是,我沒有找到我實際上正在尋找的那個。也許它們位於這個二進制文件中:/System/Library/PrivateFrameworks/CoreUI.framework//Resources/ArtFile.bin。但看不懂。我會創建我自己的。 – marsl 2010-04-21 12:40:17