Initialize the UITapGestureRecognizer with a target, self in this case, and an action which is a method that has a single parameter: a UITapGestureRecognizer.
After initialization, add it to the view that it should recognize taps in.
Swift
override func viewDidLoad() {
super.viewDidLoad()
...