Can anyone explain me, How to draw superscript and subscript alphabets with Core Text?
Thanks.
I noticed that this question is a bit old, I hope you still require assistance in this matter and that this post will help you.
you can use NSAttributedString (or its mutable counterpart NSMutableAttributedString) to assign different attributes (such as font, both name and size) to specific ranges of a single string.
Superscript and subscript are not natively supported by core text and to make them look good you might need to do quite a lot of work. Fortunately there is an open source project developed by Oliver Drobnik from cocoa genetics that allows you to easily convert HTML into NSAttributedString (or NSMutableAttributedString), feed it into a custom textview and show superscripts and subscripts (along with many other HTML and CSS) as they would appear in a UIWebview, but without the need to use a UIWebview. You can download the project from here.
While a lot of effort has been put into this project, there are two caveats: