I'm currently building a homework tracking app where you can add courses in a TableView. In one ViewController, I have a list of courses that already exist. I also have a button that allows the user to add new courses. When they click the button, the app triggers a modal segue to a new ViewController where they can fill out a form to add a new course. However, when they finish and click the button that dismisses the current ViewController to go back to the courses list, I can't find a way of updating the courses list with the course that the user just added. I know that if using a segue, you can use the prepare method. However I am calling
dismiss(animated: true, completion: nil)
The method that I want to call in order to reload the table is in the first ViewController. Is there a way to call the load method in the first ViewController before or after the second ViewController has dismissed?