Latest 1.0.2
Homepage https://github.com/IvanChan/ICAttributeLabel
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

CI Status
Version
License
Platform

If you are heading for UILabel drawing information, you are in the right place.
We calculate each line information of drawing for you, including text area each line.
Also provide Strikethrough for animation.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8.0+

Installation

ICAttributeLabel is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "ICAttributeLabel"

Try it yourself

    ICAttributeLabel *label = [[ICAttributeLabel alloc] initWithFrame:CGRectMake(50, 100, 200, 100)];
    label.numberOfLines = 0;
    label.text = @"abcdefghijklmnopqrstuvwxyz1234567890";
    [self.view addSubview:label];
    NSLog(@"%@", label.lineAttributes);

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [label setStrikethrough:YES animated:YES];
    });
  2016-03-26 01:54:35.343 ICUIKitDemo[1730:107711] (
    "<ICLabelAttribute: 0x7be9d220>, text = abcdefghijklmnopqrstuvw, textCount = 23, boundingRect = NSRect: {{0, 29.712891}, {197.70801, 20.287109}}",
    "<ICLabelAttribute: 0x7be9d300>, text = xyz1234567890, textCount = 13, boundingRect = NSRect: {{0, 50}, {125.23389, 20.287109}}"
  )

Author

_ivanC

License

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

Latest podspec

{
    "name": "ICAttributeLabel",
    "version": "1.0.2",
    "summary": "Sub-class of UILabel with more feature like line-calc & Strikethrough-animation.",
    "description": "There are features like how many lines & texts each line displaying, strikethrough-animation.",
    "homepage": "https://github.com/IvanChan/ICAttributeLabel",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "_ivanC": "_ivanC"
    },
    "source": {
        "git": "https://github.com/IvanChan/ICAttributeLabel.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "ICAttributeLabel/Classes/**/*",
    "public_header_files": "ICAttributeLabel/Classes/**/*.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This