| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I am looking for the up and down sort arrows used in table views like Mail and the Finder. After searching the archives, I found the following code snippet to create a local tiff image of the arrows:
[[[NSTableView _defaultTableHeaderSortImage] TIFFRepresentation] writeToFile: @"/tmp/sort-up.tiff" atomically: YES];
[[[NSTableView _defaultTableHeaderReverseSortImage] TIFFRepresentation] writeToFile: @"/tmp/sort-down.tiff" atomically: YES];
Is this still the recommended approach?
This works in X 10.1.1. However, there will be a problem if the "default" image changes in the future and I am still using the image I created in the past.
Is it "dangerous" to just do:
[table setIndicatorImage:[NSTableView _defaultTableHeaderSortImage] inTableColumn:[table tableColumnWithIdentifier:@"columnID"]];
so that I always get the current image? Most other apps (e.g. Mail) don't seem to actually store a tiff of the arrows in their resources, so I assume that they are obtaining the images at runtime. If so, is there an Apple-sanctioned approach for getting the images at runtime?
thanks,
Jeff Gilbert
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
| References: | |
| >finding sort arrows for NSTableView (From: Jeff Gilbert <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.