Latest 1.0.1
Homepage https://github.com/markiv/PPCopiableLabel
License MIT
Platforms ios 3.0, requires ARC
Authors

A simple subclass of UILabel that allows users to copy text with a long press. Handles
highlighting the label as needed.

PPCopiableLabel

PPCopiableLabel can be used as a drop-in replacement for UILabel. You can simply
change the custom class of any UILabel in Interface Builder, and now that label will
have the ability to display the Copy menu when pressed for a second.

PPCopiableLabel

While it displays the menu, the label changes to highlighted state, so you can easily
customize its appearance with UILabel‘s highlightedTextColor property, or within
Interface Builder, as shown in the demo.

PPCopiableLabel

label.highlightedTextColor = [UIColor redColor];

If no highlight color is specified, PPCopiableLabel takes over the label’s tintColor,
which is blue by default on iOS 7.

Installation

Install via Cocoapods. Here’s a sample Podfile:

pod 'PPCopiableLabel'

Alternatively, just drop the two files (PPCopiableLabel.m and PPCopiableLabel.h) into your project tree.

Contact

Vikram Kriplaney

License

PPCopiableLabel is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PPCopiableLabel",
    "version": "1.0.1",
    "summary": "A simple subclass of UILabel that allows users to copy text with a long press. Handles highlighting the label as needed.",
    "description": "                   PPCopiableLabel can be used as a drop-in replacement for UILabel. You can simply change the custom class of any UILabeln                   in Interface Builder, and that label will have the ability to display the Copy menu when pressed for a second.n",
    "homepage": "https://github.com/markiv/PPCopiableLabel",
    "screenshots": "https://raw.githubusercontent.com/markiv/PPCopiableLabel/master/demo.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Vikram Kriplaney": "[email protected]"
    },
    "social_media_url": "http://twitter.com/krips",
    "platforms": {
        "ios": "3.0"
    },
    "source": {
        "git": "https://github.com/markiv/PPCopiableLabel.git",
        "tag": "1.0.1"
    },
    "source_files": "Classes/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This