Converting text to number and vice versa

check to see if it able to convert
if let num = Double(nameOfString)
{

}

To change the type using the if/let statements, you need to unwrap what you have casted using '!'.
result = (Double(nameOfString))!
or
result = (Double(nameOfLabel.text!))!

Comments

Popular posts from this blog

Setting up a playground

Go to another page