这适用于10.7但不是10.8.我如何在Mountain Lion中使用它?
-(IBAction)showTargetInFinder:(id)sender
{
NSString *linkPath = [targetField stringValue];
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
[ws selectFile:linkPath inFileViewerRootedAtPath:nil];
}
Run Code Online (Sandbox Code Playgroud)