override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if self.isBeingPresented || self.isMovingToParent {
//Perform an action that will only be done once
}
}
if (!self.isBeingPresented && !self.isMovingToParentViewController) {
//except first time
}