Just starting to use Xcode and swift for the first time. On my first app i am having trouble with this error.
‘initialization of variable 'lblBdrslt' was never used; consider replacing with assignment to '_' or removing it’ on line code 16
I’m not sure exactly how it is not being used because the label should be result of the equation. If someone could help me out with the code and understanding why it happened would be appreciated.
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var txtBDwt: UITextField!
@IBOutlet weak var lblBdrslt: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
/
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
/
}
@IBAction func btnCal(sender: AnyObject) {
let bdWT = Double(txtBDwt.text!)
let bdFormCal: Double = 0.06232
var lblBdrslt = bdWT! * bdFormCal
}
}