Skip to content

Don't run an action tab when a home swipe starts on the bar - #2565

Merged
ps2 merged 1 commit into
next-devfrom
action-tab-bar-ignore-home-swipe
Oct 11, 2026
Merged

ps2 merged 1 commit into
next-devfrom
action-tab-bar-ignore-home-swipe

Conversation

@ps2

@ps2 ps2 commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

When you closed Loop with a home swipe that started on the bottom action bar, the bar often treated it as a tap. Coming back, Loop would be on the Bolus, Presets, Settings or Add Carbs screen.

Cause

ActionTabBar is a UITabBar sitting just above the home indicator, and its coordinator ran the tab's action straight from tabBar(_:didSelect:). The tab bar reports a selection even when the touch turns into a home swipe.

Fix

  • A UITapGestureRecognizer on the bar (cancelsTouchesInView = false) runs alongside the bar's own touch handling.
  • An action runs only when the bar reports a selection and the tap is recognized, in either order. A touch that moves (a swipe) or is cancelled by the system fails the tap, so nothing runs.
  • Real taps still act as soon as the finger lifts, with no delay.
  • VoiceOver and Switch Control select items without a touch, so they still act on selection alone.
  • Side effect: pressing one tab and sliding to another before lifting no longer does anything.

Testing

Tested on an iPhone 16 Pro: home swipes starting on the bar no longer open a screen, and taps on every tab work normally.

The tab bar sits over the home indicator and selects an item even when
the touch turns into a home swipe, so closing Loop often left it on the
bolus, presets, settings or carb screen. An action now runs only when a
tap is also recognized, which a moving or cancelled touch fails. Taps
still act on lift. VoiceOver and Switch Control activate items without a
touch, so they act on selection as before.
@ps2
ps2 merged commit 0de85b7 into next-dev Oct 11, 2026
shanselman pushed a commit to shanselman/LoopWorkspace that referenced this pull request Oct 11, 2026
- Loop 0de85b71: don't run an action tab when a home swipe starts on the bar (LoopKit/Loop#2565)
- LoopKit e4ebe3d3: extensible CGM event model, Modelv7 (LoopKit/LoopKit#635)
- G7SensorKit 8fa9c73: nonzero-status glucose messages and serial-number device ids (LoopKit/G7SensorKit#85), sensor identity certificates (LoopKit#86), comment fixes (LoopKit#87), Simulator pairing over a Bluetooth bridge (LoopKit#89)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant