how to convert a textfield to a int in swift 2

how to convert a textfield to a int in swift 2

Int("23") // 23
Int("23.5") // nil
if let double = Double("23.5") {
    lrint(floor(double)) // 23
}
how to convert a textfield to a int in swift 2
 
 
Q