Ga direct naar inhoud.

Hans Pinckaers

How to create a UITableViewCell with “copy” ability

It’s possible to copy the content of a UITableViewCell in the Contacts app of Apple. When you tap and hold you will see a small menu with “Copy”. I needed this functionality myself, so I subclassed the class. You are free to use this in any application, but it would be awesome if you mention me in the credits of your App.

It’s easy to use

  1. Copy the files in your project.
  2. Use this code to create a cell:
    cell = [[[HPCopyTableViewCell alloc] 
    			initWithStyle:UITableViewCellStyleValue2 
    		      reuseIdentifier:CellIdentifier] autorelease];

    Download

    HPCopyTableViewCell.zip

    3 Responses to “How to create a UITableViewCell with “copy” ability”

    1. This is perfect! Thank you so much for providing this. It is awesome you provide this type of help. I was beating my head against a wall on this one. Works great.
      Kevin
      @finalpointlogic

    2. [...] Check out his site for the files and more. http://www.hanspinckaers.com [...]

    3. Excellent – was missing the cancelled touches piece. Thank you!

    Leave a Reply