ShaunArchibald
ShaunArchibald

Reputation: 59

How to retrieve an icon of a file in Xcode (Cocoa)

I am creating a sort of the File Directory like a Finder in Xcode Cocoa Objc-C.

I have created a collection view with many square buttons and each button opens up a different file located in the app. What I have done until now is populated each button with the screenshots from the files (so that it would look like a Finder). However, I was wondering if is another way retrieving the icons/images of the files?

Thank you.

Upvotes: 0

Views: 72

Answers (1)

Rupert Pupkin
Rupert Pupkin

Reputation: 790

[NSWorkspace iconForFile:fullPath];

Upvotes: 2

Related Questions