In my App I want to show the user the Time he needed. At the moment it looks like this:
This is the actual code:
if counter <= 59.0 {
resultTimeLabel.text = String(format: "%.1", counter)
resultTimeLabel.text = "in \(counter) seconds"
}
if counter >= 60.0 {
let minutes = counter / 60.0
resultTimeLabel.text = String(format: "%.1", counter)
resultTimeLabel.text = "in \(minutes) minutes"
Which format is the right one to make it looks like: 1.5 and not 1.5000000023