This is not a valid type in Swift.
(String)someVar
If String is a valid Int subtype, you can reset it using the "as" operator, but that is not the case.
In this case, you want to initialize a new line passing Int as an argument.
someLabel.text = String(someVar)
source share