Latest 1.0.1
License MIT
Platforms ios 6.0, requires ARC

Provide the best UX to your users!

TCCopyableLabel is a subclass of UILabel that allows a user to copy the label’s text to the clipboard, just like a regular text input. This can be really useful in some situations where you dispplay some important real-life informations.


Inspired from Mattt Thompson‘s article about copyable labels I read in his great NSHipster book.

  • Compatible with Interface Builder.
  • Custom string to be copied in the clipboard instead of the label’s text (perform formatting to make your user’s life easier).
  • Delegate and block on copy events.
  • Press to copy duration is customizable.

Documentation :books:

Browse the documentation on Cocoadocs or add it directly to Xcode by downloading the docset and placing it into ~/Library/Developer/Shared/Documentation/DocSets/. (or use the great Dash)



Add the following to your Podfile and run $ pod install:

pod 'TCCopyableLabel'

If you don’t have CocoaPods installed or integrated into your project, you can learn how to do so here.

Static files

Copy/paste TCCopyableLabel/TCCopyableLabel/TCopyableLabel.{h,m} class in your project.

Import the class:

#import "TCCopyableLabel.h"


Instanciate it as you would do with a regular UILabel:

TCCopyableLabel *copyableLabel = [[TCCopyableLabel alloc] init];
[copyableLabel setText:@"Important stuff"];

// customization stuff
[copyableLabel setMinimumPressDuration:3];
[copyableLabel setCustomString:@"Custom string to be copied"];

If you are using Interface Builder, don’t forget to add TCCopyableLabel in the class field:

Interface Builder Example

If you wish to perform something once a particular label has been copied, you can do so using the TCCopyableLabelDelegate or the copiedBlock property:

TCCopyableLabel *copiableLabel1 = [[TCCopyableLabel alloc] initWithFrame:frame delegate:self];

TCCopyableLabel *copyableLabel2 = [[TCCopyableLabel alloc] initWithFrame:frame  copiedBlock:^(NSString *copiedString) {
  // do stuff

Latest podspec

    "name": "TCCopyableLabel",
    "version": "1.0.1",
    "summary": "UILabel that can by copied to the clipboard by the user",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Thibault Charbonnier": "[email protected]"
    "platforms": {
        "ios": "6.0"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": "TCCopyableLabel/TCCopyableLabel/**/*.{h,m}",
    "requires_arc": true,
    "xcconfig": {
        "OTHER_LDFLAGS": "-ObjC"

Pin It on Pinterest

Share This