Swift: Add Tap Gesture Recognizer to Custom UI Element
Swift: Add Tap Gesture Recognizer to Custom UI Element avatar

To recognize a touch or tap on a custom ui element programmatically in swift use the following schema: