0
class_addMethod(finder_class, @selector(FO_drawIconWithFrame:),
                    class_getMethodImplementation(self_class, @selector(FO_drawIconWithFrame:)),"v@:{CGRect={CGPoint=dd}{CGSize=dd}}");

    old = class_getInstanceMethod(finder_class, @selector(drawIconWithFrame:));
    new = class_getInstanceMethod(finder_class, @selector(FO_drawIconWithFrame:));
    method_exchangeImplementations(old, new);


// AND//

FO_drawIconWithFrame
{
...
NSString *path = [self objectValue];
...
}

我想要全路径。但是 [自身节点] <- 错误

4

1 回答 1

0

这行得通吗?

NSURL *url = [[NSClassFromString(@"FINode") nodeFromNodeRef:[(TNodeIconAndNameCell *)self node ]->fNodeRef] previewItemURL];

NSString *path = [url path];
于 2012-10-03T09:55:45.950 回答