There is a textfield ,
which is inherited from the ViewHelper.designForInputText(textField: Region) class ViewHelper.designForInputText(textField: Region) , I made it so that when I clicked on it, it leads to another viewcotroller - Regions
@IBAction func RegionClick(_ sender: Any) { Region.inputView = UIView() let newViewController = Regions() self.navigationController?.pushViewController(newViewController, animated: true) } It all works, and when some operations are completed (in this case, the previous Registration controller returns when choosing any position, so as not to complicate things),
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if tableView == self.tableView{ let newViewController = Registration() self.navigationController?.pushViewController(newViewController, animated: true) }else{ let newViewController = Registration() self.navigationController?.pushViewController(newViewController, animated: true) } already when it passed back, it gives an error Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
If you make a check for nil, then exactly the same thing happens with the next variable Phone , what's the error with this return?
