I have an app which have a segue paying data to an UIView and I need to display the percent sign after the number and also only one or two decimal digits. I’m doing as you can see below because I could not do the same from the first example below using “format:” into the second example.
var dailyUviString: String {
return String(format: "%.1f", dailyUvi!)
}
var dailyPopString: String {
return String("\(dailyPop!*100) %")
}
Any ideas ?
Thanks