xcode execute code after when navigating back to screen
// Use this if you don't want to override the navigation style, text, etc.
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if self.isMovingFromParent {
// Your code...
}
}