Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* fixed Demo code

  • Loading branch information...
commit 785bb7560a27c4efd4c7a0e1b98f16c5ce31c656 1 parent c854564
@novi authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 LTCoreText/MainViewController.m
View
4 LTCoreText/MainViewController.m
@@ -416,7 +416,7 @@ -(void)textviewDidChangeScrollIndex:(LTTextView *)textView
for (NSDictionary* dict in vals) {
- NSMutableArray* frames = [dict objectForKey:@"LTTextAttrFrames"];
+ NSMutableArray* frames = [dict objectForKey:LTTextLayouterAttributeValueFrameKey];
UIColor* color = [UIColor colorWithHue:(rand()%20)*1.0/20.0 saturation:(rand()%20)/20.0 brightness:0.5 alpha:0.3];
for (NSValue* frameObj in frames) {
UIView* view = [[UIView alloc] initWithFrame:[frameObj CGRectValue]];
@@ -431,7 +431,7 @@ -(void)textviewDidChangeScrollIndex:(LTTextView *)textView
CGAffineTransform t = CGAffineTransformIdentity;
rubyLabel.transform = CGAffineTransformRotate(t, M_PI_2);
rubyLabel.font = [UIFont fontWithName:@"HiraMinProN-W3" size:12.0f];
- rubyLabel.text = [layouter.attributedString.string substringWithRange:[[dict objectForKey:@"LTTextAttrRange"] rangeValue]];
+ rubyLabel.text = [layouter.attributedString.string substringWithRange:[[dict objectForKey:LTTextLayouterAttributeValueRangeKey] rangeValue]];
[rubyLabel sizeToFit];
CGRect rf = rubyLabel.frame;
rubyLabel.center = CGPointMake(CGRectGetMidX(view.bounds)+rf.size.width*0.5, CGRectGetMidY(view.bounds));
Please sign in to comment.
Something went wrong with that request. Please try again.