Skip to Main Content
Professional iPhone® and iPad™ Application Development
book

Professional iPhone® and iPad™ Application Development

by Gene Backlin
November 2010
Intermediate to advanced content levelIntermediate to advanced
600 pages
14h 21m
English
Wrox
Content preview from Professional iPhone® and iPad™ Application Development

Chapter 11. The Pasteboard

WHAT'S IN THIS CHAPTER?

  • Items you can place on the UIPasteboard

  • Identifying and performing cut, copy, and paste operations

  • Customizing menu items on the iPad

With the introduction of iPhone OS 3.0, users were able to copy text, images, or other data in one application and paste that data to either another location within the same application or a different application.

Note

If you're getting confused by references between iPhone and iPad here, remember this: At this time, the iPad is the only device that allows the developer to customize the standard Cut, Copy, Paste editing menu. The iPhone works with only the options that Apple gives the developer.

The copy-cut-paste process is included in the following:

  • UITextView

  • UITextField

  • UIWebView

The UIKit framework provides the following classes and protocols that provide the architecture so you can implement cut, copy, and paste in your applications:

  • The UIPasteboard class provides pasteboards, allowing for the sharing of data within an application or between applications by writing and reading data to and from a pasteboard.

  • The UIMenuController class displays the editing menu, allowing selected items to be copied, cut, or pasted into the pasteboard.

  • The UIResponder class declares the method canPerformAction:withSender:, which determines what editing commands appear on the menu.

  • The UIResponderStandardEditActions class is invoked when the user taps one of the commands in the editing menu.

In this chapter you will learn how ...

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.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo, John Arkontaky, Yat Siu

Publisher Resources

ISBN: 9780470878194Purchase book