Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if isMovingToParent {
// start timer
}
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if isMovingFromParent {
// invalidate timer
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment