Added gesture detection for UI show/hide