我正在嘗試爲Finder創建一個SIMBL插件,以便在某些文件上添加圖標疊加層。爲SIMBL插件生成「Finder.h」
我有這樣的代碼:
@implementation NSObject (FAIconOverlay)
- (void)FAIconOverlay_TIconAndTextCell_drawIconWithFrame:(struct CGRect)arg1
{
[self FAIconOverlay_TIconAndTextCell_drawIconWithFrame:arg1];
if (![self respondsToSelector:@selector(node)]) {
return;
}
NSLog(@"%@", [[[NSClassFromString(@"FINode") nodeWithFENode:[(TNodeIconAndNameCell *)self node]] fullPath] lastPathComponent]);
// Draw the icon overlay
}
- (void)FAIconOverlay_TDesktopIcon_drawIconInContext:(struct CGContext *)arg1
{
[self FAIconOverlay_TDesktopIcon_drawIconInContext:arg1];
}
@end
我可以繪製圖標疊加,但是,當我嘗試獲取文件的我得到一個「未聲明的標識符TNodeIconAndNameCell的使用」的路徑。看這個鏈接< How to Write OS X Finder plugin>我看到這是必要的生成Finder.h文件...
我的問題是:如何生成此文件?我試着運行「class-dump -H Finder.app」,但是編譯錯誤太多
非常感謝!