Version: 1.0

Posted: 2009-05-29

Build Requirements: Mac OS X 10.6, Xcode 3.2

Runtime Requirements: Mac OS X 10.6

View Source Code:

Download Sample Code (“DesktopImage.zip”, 61.8K)



Description

"DesktopImage" is a Cocoa sample application that demonstrates how to use the NSDesktopImages category of NSWorkspace. It shows how to use this set of APIs to set the desktop image for a given screen. An NSURL is used to describe that image.

An "options" dictionary controls how the image is presented: scaling factor, clipping state which affects the interpretation of Proportional scaling types, and fill color applied to any empty space around the image.

Document Revision History

Date Notes
2009-05-29Demonstrates how to use the NSDesktopImages category of NSWorkspace to set the desktop image for a given screen.