I have view1 and view2. In view2 I set up a delegate and enter some data. When I press the save button i view2 I am sent to view1. In view1 I get the data I entered in view2. BUT... when I try to update a label or button text in view1 with the data from view2 nothing happens. View1 is not updated.
This is the delegate function in view1 which should update the label:
func getCurrentContact(ViewController: ViewControllerSettings, data: (ContactDetails)) {
NSLog("Yes, the delegate is called")
self.lblContact1.text = data.name1 as? String
}
Anyone know why lblContact1.text is not updated? It just stay the same as on startup. The NSLog of data.name1 contains the correct data I entered in view2. Seems like view1 needs to be refreshed or something...
BTW; Does anyone know about a working swift project in GitHub or something that has navigation controller and a working delegate for sending data from view2 to view1? Would be outstanding...