我正在尝试为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”,但是编译错误太多
非常感谢!