Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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