Track when the user completes the touch with the touchesEnded function. In the body of the function, you can write down any action that occurs after touching.
TouchesEnded – tells the responder when one or more.
The default implementation of this method. However immediate UIKit subclasses of UIResponder, particularly UIView, forward the message up the responder chain. To forward the message to the next responder, send the message to super (the superclass implementation); Do not send the message.

Swift tutorial programming

Tutorial language Swift