I want to add a custom function when PMAlertController dismiss , but the function / print() simply wont be fired in the viewDidDisappear function . Anyone has idea what 's going on ?