Last active
March 21, 2021 18:44
-
-
Save LearnWithTung/bff0f5fd5ef6c83f0a1c9a9e79427fc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewControllerA { | |
var onButtonTappedObserve: (() -> Void)? | |
... | |
@IBAction func buttonTapped(_ sender: UIButton) { | |
onButtonTappedObserve?(// dependencies if any) | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment