Adding a closure as a target to UIButton and other controls in Swift

iOS 14 introduced new APIs that allow us to use the UIAction type when defining actions associated with UIControls. In this short post, Antoine Van Der Lee shows us how we can use these new APIs to define our actions as closures, improving the discoverability of our action definitions.