Cocoa Programming for OS X: The Big Nerd Ranch Guide
by Aaron Hillegass, Adam Preble, Nate Chandler
21 Pasteboards and Nil-Targeted Actions
A process called the pasteboard server (/usr/sbin/pboard) runs on your Mac. Applications use the NSPasteboard class to write data into that process and to read data from that process. The pasteboard server makes copying, cutting, and pasting between applications possible.
An application can copy the same data onto the pasteboard in several formats. For example, an image can be copied onto the pasteboard as a PDF document and as a PNG image. Then the application that reads the data can choose the format that it likes most. The pasteboard uses UTIs to identify the various types used on the pasteboard.
Multiple items can be written to the pasteboard at once, each with its own set of representations, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access