I am trying to launch the app, but I get the following error: Exception NSException * "[<Calculus_area_and_perimeter.ViewController 0x14c506020> setValue: forUndefinedKey:]: this class is not key value coding-compliant for the key calcArea." 0x0000600002799cb0.
can anyone help me? how can i solve? Thanks.
the code:
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var larghezzaField: UITextField!
@IBOutlet weak var altezzaField: UITextField!
@IBOutlet weak var result: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func TotArea(_ sender: UIButton) {
if let L = Double(larghezzaField.text!) {
if let H = Double(altezzaField.text!) {
result.text = String (L * H)
} else
{result}
}
}
@IBAction func calcPerimetro(_ sender: UIButton) {
}
@IBAction func cancella(_ sender: UIButton) {
}
}