I have two View Controller, lets call them A1 and A2. A1 has consits of a tableView with various entries. If I click on an entry namend "Orange" in A1, A2 should show details about Orange. To store the data I use Core Data. I filter the data I need for the Orange in A1 and now I want to pass the data like name, size etc. to A2. I tried to use a function in A1 wich sets the variables in A2. This works but when I perform the segue all the data is gone. What can I do to pass the data?
I call this initializer function from A1, the function itself is placed in A2.
Code Block func initializer(caption: String, size : String, text: String) { self.text = text self.fruitCaption = caption self.fruitSize = size }
I call this initializer function from A1, the function itself is placed in A2.