MacPandit

The secret of success is making your vocation your vacation

iPhone SDK 3.0 support Cut, Copy and Paste feature. April 12, 2009

Filed under: iPhone — Pandit @ 5:47 pm


In iPhone OS 3.0, the UIKit framework provides new classes to support pasteboard operations and also incorporates selection and pasteboard behaviors into some existing UIKit views. You can use the new classes to incorporate support cut, copy, and paste behaviors into your application. One of the key new classes is the UIPasteboard class, which manages the content on the systemwide pasteboards. It is through this class that you can now store selected content and transfer it within your application or to other applications.

The UIPasteboard object provides built-in support for storing standard data types such as strings, images, colors, and URLs. These types represent some of the most common data types and make it easier to exchange content between applications. However, you can also exchange content in custom data formats supported only by your application or in more standardized interchange formats.

Several existing UIKit views now provide automatic support for text selection and pasteboard operations. In particular, the UITextField, UITextView, and UIWebView classes automatically handle text selections and the display of an editing menu with the appropriate Cut, Copy, Paste, Select, and Select all commands.

For custom views, the UIKit framework also includes the UIMenuController class for managing the editing menu. You use this class, together with your application’s own custom selection behavior, to allow the user to cut, copy, paste, and select custom content. The menu displays standard commands to cut or copy the selected content or to paste new content based on the operations currently supported by your view.

Advertisement
 

One Response to “iPhone SDK 3.0 support Cut, Copy and Paste feature.”

  1. gopal Says:

    thank you share with us …keep it up


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.