1. Engineering
  2. Computer Science
  3. swift programming how do i fix this error thanks...

Question: swift programming how do i fix this error thanks...

Question details

Swift Programming

How do I fix this error, thanks

QIBAction func transferButton(. sender: Any) let userID Auth.auth().currentUser !.uid let payoutTotal- payoutAmount.text! payoutTotDouble(payoutTotal) payoutTot (payoutTot 133) //doubleBal Double (payoutTotal) stringBal-balanceAmount.text doubleBal Double(stringBal) Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value bal ((doubleBal)-(payoutTot/109)) print (bal) bal ((doubleBal)+(payoutTot/100)) actionTitleError! action!tem = Insufficient funds let alert UIAlertcontroller(title: actionTitle, message: actionItem, preferredstyle: .alert) alert.addAction(UIAlertAction(title: OK, style: .default, handler: action in self.navigationcontroller?.popViewController(animated: true) self.present (alert, animated: true, completion: nil) else if (bal e) let payoutInfo userID: userID, amount: payoutTot as Any, balance bal as Any] as [String:Any self.payoutUserAmount (payoutInfo: payoutInfo) actionTitle Success! action!tem Your balance transfer has been completed

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution