Typically, when using UIControl or UIButton, we add a selector as a callback action for when an event occurs on a button or control, such as the user pressing the button or touching the control.
For example, we would do the following:
import UIKit
class ViewController: UIViewController {
@...