Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

parsing to double any data type in swift

if let cost = Double(textField.text!) {
    print("The item is valued at: (cost)")
} else {
    print("Not a valid number: (textField.text!)")
}
Source by supereasyapps.com #
 
PREVIOUS NEXT
Tagged: #parsing #double #data #type #swift
ADD COMMENT
Topic
Name
2+2 =