Latest0.0.1
Homepagehttps://github.com/liaojinxing/RichStyleLabel
LicenseMIT
Platformsios 6.0, requires ARC
Authors

Subclass of UILabel with rich style, such as auto checking links, supporting regular expression.

It supports:

  • Auto check links in text, and apply the link style.
  • Apply user defined attributes to regular expression match results.

examle

Installation

  • Grab the source file into your project.
  • Or use cocoapods. Here is an example of your podfile:
pod 'RichStyleLabel'

Example

RichStyleLabel *regexLabel = [[RichStyleLabel alloc] initWithFrame:CGRectMake(0, 200, 320, 100)];
NSDictionary* redTextAttributes = @{ NSForegroundColorAttributeName : [UIColor redColor]};
[regexLabel setAttributedText:@"123Hello, world! " withRegularPattern:@"^[0-9]+" attributes:redTextAttributes];

See the project for more details.

License

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

Latest podspec

{
    "name": "RichStyleLabel",
    "version": "0.0.1",
    "summary": "Subclass of UILabel with rich style, such as auto checking links, supporting regular expression.",
    "homepage": "https://github.com/liaojinxing/RichStyleLabel",
    "authors": {
        "liaojinxing": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "license": "MIT",
    "source": {
        "git": "https://github.com/liaojinxing/RichStyleLabel.git",
        "tag": "0.0.1"
    },
    "source_files": "RichStyleLabel/RichStyleLabel/*.{h,m}",
    "requires_arc": true,
    "screenshots": [
        "https://raw.githubusercontent.com/liaojinxing/RichStyleLabel/master/Screenshots/example.png"
    ]
}

Pin It on Pinterest

Share This