• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder Source List Icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Source List Icons


  • Subject: Re: Finder Source List Icons
  • From: Charles Srstka <email@hidden>
  • Date: Sun, 30 Dec 2012 00:36:59 -0600

On Dec 29, 2012, at 10:46 PM, koko <email@hidden> wrote:

> Are the icons in the Finders Source List available to developer apps or does the developer have to capture and photoshop them?

The icons for the items that are currently in the source list can be obtained like this:

LSSharedFileListRef list = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListFavoriteItems, NULL);
NSArray *items = CFBridgingRelease(LSSharedFileListCopySnapshot(list, NULL));

for (id eachItem in items) {
    IconRef iconRef = LSSharedFileListItemCopyIconRef((__bridge LSSharedFileListItemRef)eachItem);
    NSImage *iconImage = [[NSImage alloc] initWithIconRef:iconRef];

    // do something with the image
}

CFRelease(list);

Charles


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Finder Source List Icons
      • From: Charles Srstka <email@hidden>
    • Re: Finder Source List Icons
      • From: koko <email@hidden>
References: 
 >Finder Source List Icons (From: koko <email@hidden>)

  • Prev by Date: Re: Finder Source List Icons
  • Next by Date: Where are temporary documents stored until saved?
  • Previous by thread: Re: Finder Source List Icons
  • Next by thread: Re: Finder Source List Icons
  • Index(es):
    • Date
    • Thread