Finder 用の SIMBL プラグインを作成して、一部のファイルにアイコン オーバーレイを追加しようとしています。
私はこのコードを持っています:
@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 の使用」が表示されます。このリンクを見る < OS X Finderプラグインの書き方> Finder.hファイルを生成する必要があることがわかりました...
私の質問は: このファイルを生成する方法?? 「class-dump -H Finder.app」を実行してみましたが、コンパイル エラーが多すぎます
どうもありがとうございました!