How would I set a NSButton's image to the Finder icon (programmatically) ?
I'm trying to do this in Objective-C/Cocoa (Mac)
Any help would be appreciated!
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
NSImage *finderIcon = [workspace iconForFile:[workspace absolutePathForAppBundleWithIdentifier:@"com.apple.Finder"]];
[finderIcon setSize:NSMakeSize(128.0, 128.0)];
[yourButton setImage:finderIcon];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With