ICAttributeLabel 1.0.2

ICAttributeLabel 1.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2017

Maintained by _ivanC--description=macbook pro.



  • By
  • _ivanC

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.