iPhone OS Reference Library Apple Developer Connection spyglass button

Version: 1.0

Posted: 2009-07-08

Build Requirements: Xcode 3.1 or later, Mac OS X 10.5.7 or later, iPhone OS 3.0

Runtime Requirements: Mac OS X v10.5.7 or later, iPhone OS 3.0

View Source Code:

Download Sample Code (“CopyPasteTile.zip”, 31.5K)



Description

CopyPasteTile demonstrates how to implement the copy-cut-paste feature introduced in iPhone OS 3.0. The sample:

* Shows how to use the UIMenuController class to position and display the editing menu (the menu with the Copy, Cut, Paste, and other commands).

* Illustrates how you might implement the canPerformAction:withSender: method of UIResponder to validate the menu commands for the current context.

* Shows how to respond when the user taps a menu command by reading and writing data to a pasteboard, (an instance of the UIPasteboard class).

Document Revision History

Date Notes
2009-07-08Demonstrates how to implement copy, cut, and paste in your application.
Did this document help you? Yes It's good, but... Not helpful...