reloading data/refreshing data in parent ViewController

90 Views Asked by At

From a parent VC two other VCs get pushed (first adds a group, second adds some (optional) more data); after popping them the parent VC appears but the new data (new group) is not added. I am using UIRefreshControl to pull to refresh calling loadGroups(toRefresh: true) with a Bool value indicating if refreshing data is needed. I would like to call same method automatically when closing the pushed VCs, so after parent VC reappears it presents new data w/o the need for pulling to refresh. I tried doing so in viewWillAppear but then the method gets called twice- first when the parent VC first appears and then after popping the overlaying controllers. Is there a method to make sure it gets called only once (when-reappearing)?

0

There are 0 best solutions below