Simplified pinchGesturePerformed and added flags to turn pinch gesture on/off