Superscript doesn't work
moughxyz opened this issue · comments
Mo commented
I'm trying to add superscripts with your label, but it doesn't work:
OHAttributedLabel *label = [[OHAttributedLabel alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
NSMutableAttributedString* attrStr = [NSMutableAttributedString attributedStringWithString:@"Hello world my name is Ben Franklin"];
[attrStr setTextColor:[UIColor blackColor]];
[attrStr addAttribute:(NSString*)kCTSuperscriptAttributeName value:@(1) range:NSMakeRange(3, 5)];
[label setAttributedText:attrStr];
[self.view addSubview:label];
If I change OHAttributedLabel to UILabel (in iOS 6) with the same exact code as above, it works just fine.
Olivier Halligon commented
Mo commented
Yes I noticed those. I think it might be helpful to have some sort of "limitations" section, where you discuss what is and isn't possible.
Olivier Halligon commented
You're right, that's actually a good idea!
I'll try to add a dedicated page in the wiki and mention it in the README soon :)