Add delegate methods to detect the pan gesture recognizer beginning and ending.