O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Challenge: Write Multiple Representations

You are putting the string onto the pasteboard. Create the PDF for the view and put that on the pasteboard, too. Now you will be able to copy the image of the die into graphics programs. Test it using Preview’s New from Clipboard menu item. (Do not break the string’s copy and paste: Put both the string and the PDF onto the pasteboard.) Hint: You will need to create an NSPasteboardItem.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required