Is there an event that fires in parent controller when returning from second view controller? The purpose would be to refresh some data (view) in the parent controller. The equivalent in Android would be onResume
Asked
Active
Viewed 74 times
0
-
What is second view controller and how did you navigate to it? Did you use a segue? Post some code perhaps – Gurtej Singh Aug 25 '15 at 08:35
-
You can use `protocol`. Refer this [answer](http://stackoverflow.com/a/24299231/3734028) for more – iRiziya Aug 25 '15 at 08:40
-
It is s straight view controller to another view controller with a normal segue. Nothing special. Will look up the protocol route but it seems like a complex solution for a very basic issue. – Michele Diblasi Aug 25 '15 at 08:54
-
@MicheleDiblasi Or you can also refresh your data in `viewWillAppear` method of parent controller – iRiziya Aug 25 '15 at 08:59
-
1viewWillAppear seems to work perfectly. It fires on initial start of view controller and also on any subsequent times logic comes back to parent controller from a second view. Just exactly what I wanted. Thanks – Michele Diblasi Aug 25 '15 at 09:27