Version 1.6, 2012-08-27
Upgraded to Xcode 4.5 and Mac OS X 10.8, app is now sandboxed, and uses a security-scoped bookmark of the search location, fixed some leaks, eliminated some compiler warnings.
(Full Revision History)
Xcode 4.4, Mac OS X 10.8 or later
Mac OS X 10.8 or later
This sample application uses Spotlight to perform a search for images on your computer. The NSPredicateEditor is used to create a custom search query. The results are displayed in a custom NSTextFieldCell subclass that automatically adds tracking areas to perform automatic rollover highlighting effects inside the cells. A custom DateCell class is implemented that demonstrates how to properly truncate dates based on the cell size. The NSPathControl is used to display selected paths. Custom views inside a menu are shown with sample code. Finally, thread safe background thumbnail image processing is demonstrated by the data model.
PhotoSearch is App Sandboxed which offers strong defense against damage from malicious code. In doing so, it allows you to retain access to file-system resources by employing a security mechanism, known as security-scoped bookmarks, that preserves user intent between app launches. Hence, the earch location or scope becomes a security-scoped bookmark.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-08-27)