import UIKit
class ViewController: UIViewController {
@IBOutlet var purchaseField:UITextField!
@IBOutlet var priceField:UITextField!
@IBAction func addPurchase() {
let purchase:String = purchaseField.text!
let price:Double = priceField.text
print("eaten \(purchase)")
}
}
Erro CANNOT CONVERT A TYPE STRING TO DOUBLE
na linha let price:Double
, qual o tipo correto do campo var priceField para esse caso?