I\'ve been trying to make an app in Xcode 7 using Swift and I\'m trying to convert numbers inside a textfield to an integer using this code, let a = Int(percentLabel.t
let a = Int(percentLabel.t
This code returns a new value every time you call it. I expect it what you're looking for
var myInt: Int? { return Int(percentLabel.text!) }
instead of
let myString = percentLabel let myInt: Int? = Int(myString)