I need to make subscripts for chemistry formulas (H2O, Na^2+, etc)?
Is this possible to do with NSAttributedString, or is there an alternative/easier way to make sub
you can also do the following if you want to make it a litle cleaner
NSDictionary *attr = @{ NSFontAttributeName: smallfont, (NSString*)kCTSuperscriptAttributeName: @1 } NSRange fabricWeightRange = NSMakeRange(fabricWeight.location + 2, 1); [subKeyString setAttributes:attr range:fabricWeightRange];