protected override void OnDetached() { if (touchRecognizer != null) { // Clean up the TouchRecognizer object touchRecognizer.Detach(); // Remove the TouchRecognizer from the UIView view.RemoveGestureRecognizer(touchRecognizer); } }