Created
October 23, 2020 12:43
-
-
Save DiganVaghasiya/abb6de864e1adea652ede40bd116c069 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) | |
| { | |
| let addNewEmpVC = storyboard?.instantiateViewController(withIdentifier: "addNewEmpVC") as! addNewEmpVC | |
| addNewEmpVC.selectedIndex = indexPath.row | |
| addNewEmpVC.EmpDictionary = arrEmployee[indexPath.row] | |
| arrEmployee.isEdit = true | |
| self.navigationController?.pushViewController(addNewEmpVC, animated: true) | |
| } | |
| Then check condition in submit data view controller’s viewDidLaad( ) : - | |
| override func viewDidLoad() { | |
| super.viewDidLoad ( ) | |
| self.navigationController?.navigationItem.setHidesBackButton | |
| (true, animated: false) | |
| if isEdit == true{ | |
| txtName.text = self.EmpDictionary["EmpName"] | |
| txtEmail.text = self.EmpDictionary["EmpEmail"] | |
| txtContact.text = self.EmpDictionary[ "EmpContact"] | |
| txtdesignation.text = self.EmpDictionary["EmpDesignation"] | |
| let url = directoryURLGettingImage(strNAme: EmpDictionary[ "Profile" ]! as! String) | |
| let imgdata = try!Data(contentsOf: url as! URL) | |
| if imgdata != nil | |
| { | |
| self.imgview.image = UIImage(data: imgdata) | |
| } | |
| } else{ | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment