How to Use UIPasteBoard to Implement Custom Copy and Paste In Your App

Matthew Campbell, October 26th

Finally, we can share data between our apps using custom copy and paste in the latest version of iPhone OS. Here is how you do it!

As you know many of the controls in UIKit now come pre-loaded with the ability to copy and paste text. You can also use this new ability in your own apps to copy and paste other things including: images, SQLite databases, text or any file. This is a great way to share data between your apps if you want to provide users with a suite of apps with integrated functionality.

…also, it is very easy. Check out the video below:

Using UIPasteBoard in iPhone programming is amazingly simple and opens up some possibilities that we did not have a year ago. To use UIPasteBoard you simply create a instance using pasteboardWithName, put stuff into the paste board and then set the persistant property equal to YES. Then any app can get a reference to your paste board and use the data contained within. You can use it for simple strings and even data that you can put into NSData like SQLite databases.

Please tell us know by commenting below!

PS: If you are a member of my mailing list stay tuned for details on how to get the complete source code for these projects.  If you are not sign up today before you miss out!

How to Use UIPasteBoard to Implement Custom Copy and Paste In Your App…

You’ve been kicked (a good thing) – Trackback from – iPhone SDK links, community driven…

  • Hours of videos, demos & screen casts
  • Detailed HANDS-ON Exercises
  • Much Much Much More
  • UIKit
  • Objective-C
  • Core Data
  • More!
  • Learn How To Make An iPhone App right now using my proven system.

    PS: Tons of us are having a blast living off our own code, join us now. Click here to get all the details.