- StackOverflow link: https://stackoverflow.com/questions/45955583/detect-when-a-view-controller-goes-to-background-and-gets-resumed
override func viewWillAppear(_ animated: Bool) {
NotificationCenter.default.addObserver(self, selector: #selector(didBecomeActive(notification:)),
name: UIApplication.didBecomeActiveNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(willResign(notification:)),