Last active
April 16, 2019 15:21
-
-
Save alexbaramilis/3c0b4ba427ff163ac06086169a627878 to your computer and use it in GitHub Desktop.
Using setAttributedTextWithSubscripts extension on UILabel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let text = "Main pollutant: \(Text.forMainPollutant(data.pollution.mainPollutantUS))" | |
mainPollutantLabel.setAttributedTextWithSubscripts(text: text, | |
indicesOfSubscripts: text.indicesOfNumbers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment