0

We used a chronometer using the method of NSTimer and we want to use the value that this one displays in a UILabel in the View Controller to do some other simple operations but it doesn't work.

Our code to transform it from String to Integer is: var labelText : String = countingLabel.text!

Thank You! We are new in this (7 hours) and will greatly appreciate any help

IBstudent
  • 1
  • 3

1 Answers1

0

To convert the string to an int, just call:

var timerInt = Int(labelText)

sschale
  • 5,168
  • 3
  • 29
  • 36