Looking through some other SO questions, it appears that other people are having problems getting kCTSuperscriptAttributeName to display superscripts and subscripts correctly. I've been unable to find any successful implementation of kCTSuperscriptAttributeName, even though Apple's docs claim that it works.
I tried this, but xCode shows an error, listing it as "undeclared identifier"
NSDictionary * superscriptAttrs = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:1] forKey:kCTSuperscriptAttributeName];
Some people also claim it to be possible to make superscripts and subscripts through WebViews, but my subscripts/superscripts need to be dynamic so I'm afraid this method will complicate things.
Either the correct way to implement kSupersciptAttributeName or an alternative route I could take to make scripts would be appreciated. Thanks
You need to #import <CoreText/CTStringAttributes.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With