Home:ALL Converter>Change font size of superscript text in a dynamic html string in iOS Swift

Change font size of superscript text in a dynamic html string in iOS Swift

Ask Time:2018-06-08T22:08:38         Author:edp

Json Formatter

We have some html that contains superscript returned from Wordpress that we'd like to turn into a string for display in an iOS app, for example:

"Lorem Ipsum is simply dummy text of the printing and typesetting industry 1"

We are converting this into an NSAttributed string and applying a font and fontsize to it, however, the superscript is rendered at the same size as the main test. How would we apply a smaller font size to the superscript where the text is dynamic i.e. we don't know the rename in advance?

Author:edp,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/50762493/change-font-size-of-superscript-text-in-a-dynamic-html-string-in-ios-swift
yy