Permalink
Browse files

* fixed Demo code

  • Loading branch information...
novi committed Mar 20, 2012
1 parent c854564 commit 785bb7560a27c4efd4c7a0e1b98f16c5ce31c656
Showing with 2 additions and 2 deletions.
  1. +2 −2 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));

0 comments on commit 785bb75

Please sign in to comment.