Skip to main content

Swipe-back gesture is enabled on iOS

ab-001969 · mobile-ux-patterns.platform-conventions.swipe-back-ios
Severity: mediumactive

Why it matters

Setting gestureEnabled: false on a stack screen disables the iOS edge-swipe-back gesture for that route only — users learn to swipe back on every other screen, then hit one where it silently fails. They assume the app is broken. This pattern is most common when developers copy-paste screen options without realizing the flag's scope, and it is a specific anti-pattern called out in Apple's HIG navigation section.

Severity rationale

Medium because the back button still works, but the inconsistency trains users to distrust navigation.

Remediation

Audit every Stack.Screen and every screenOptions block for gestureEnabled: false and remove it unless there is a documented UX reason (e.g., mid-checkout to prevent accidental cancellation):

<Stack.Navigator screenOptions={{ gestureEnabled: true, gestureDirection: 'horizontal' }}>
  <Stack.Screen name="Detail" component={DetailScreen} />
</Stack.Navigator>

Prefer createNativeStackNavigator over the legacy JS stack — swipe-back is native and smoother.

Detection

  • ID: mobile-ux-patterns.platform-conventions.swipe-back-ios

  • Severity: medium

  • What to look for: Enumerate all Stack.Screen definitions. For each, check the gestureEnabled setting — quote the actual value found. If using React Navigation, check whether createNativeStackNavigator or createStackNavigator is used (native stack supports swipe-back by default).

  • Pass criteria: Swipe-back gesture is enabled on at least 100% of navigable screens on iOS via gestureEnabled: true (default in React Navigation native stack) or equivalent. No screen explicitly sets gestureEnabled: false without a documented UX reason.

  • Fail criteria: Swipe-back gesture is disabled via gestureEnabled: false on any screen, or custom navigation does not support swipe-back on iOS.

  • Skip (N/A) when: App is Android-only, or is a single-screen app with no navigation stack.

  • Detail on fail: Quote the navigation config. "React Navigation is configured but gestureEnabled: false set on DetailScreen — users must tap back button." or "Custom navigation does not support iOS swipe-back."

  • Remediation: React Navigation enables swipe-back by default on iOS. Ensure it is not disabled:

    const Stack = createNativeStackNavigator();
    
    <Stack.Navigator
      screenOptions={{
        gestureEnabled: true,  // Enable swipe-back (default on iOS)
        gestureDirection: 'horizontal',
      }}
    >
      <Stack.Screen name="Home" component={HomeScreen} />
    </Stack.Navigator>
    

Taxons

History