Skip to content

Always use system sheets on iOS 27, also when pushed - #34

Merged
nighthawk merged 2 commits into
mainfrom
fix/sheet-after-push
Oct 15, 2026
Merged

nighthawk merged 2 commits into
mainfrom
fix/sheet-after-push

Conversation

@nighthawk

@nighthawk nighthawk commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #33.

Why

When an app pushes a TGCardViewController onto a navigation stack, iOS 27 showed its cards the classic way instead of in the system sheet, until something laid the view out again, e.g., rotating the device. viewDidAppear is called while the push transition is still under way, so the sheet can't be presented yet; the install fell back to the classic cards, and nothing retried.

Whether to use a sheet is a fixed decision (iOS 27+, floating mode, not inside another sheet). Only when the sheet can be presented varies, as it's a modal presentation. Falling back to the classic cards while waiting hid bugs like this one, and made "iOS 27 means sheets" untrue.

What

  • While a transition is in the way, the sheet gets presented right after it completes.
  • On iOS 27, the classic cards never show: while the sheet can't be presented yet, the cards stay hidden.
  • presentationStyle and .classic are deprecated on iOS 27, as they no longer have an effect, so that they can be removed once iOS 27 is the minimum. The Example's -classicCards launch argument is gone.

Testing

  1. On iOS 27, in an app that pushes a TGCardViewController onto a UINavigationController: the cards show in the sheet right after the push, without rotating. Pushing another screen over it and back shows the sheet again. (To try it with the Example, set the window's root to a navigation controller in SceneDelegate and push the storyboard's card controller.)
  2. On iOS 27, the Example as is shows the sheet on launch.
  3. On iOS 26, the Example shows the classic card as before.
  4. In TripGo on iOS 27 with a fresh install, the map shows without a card behind the Terms of Use, and the sheet appears once they're accepted.

🤖 Generated with Claude Code

nighthawk and others added 2 commits October 15, 2026 10:51
When the card controller gets pushed, `viewDidAppear` is called while
the push transition is still under way, so the sheet couldn't be
presented yet and the cards fell back to the classic look. Nothing
retried until the next layout pass, e.g., after rotating the device.
Now the cards stay hidden and the sheet gets presented right after the
transition completes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On iOS 27 and later, cards now always show in a system sheet. Until the
sheet can be presented, e.g., while something else is presented, the
cards stay hidden rather than showing the classic way, so the classic
cards never show on iOS 27.

`presentationStyle` and its `.classic` option are deprecated on iOS 27,
as they no longer have an effect, so that they can be removed once
iOS 27 is the minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nighthawk nighthawk changed the title Show the system sheet when pushed onto a navigation stack Always use system sheets on iOS 27, also when pushed Oct 15, 2026
@nighthawk

Copy link
Copy Markdown
Member Author

Suggested squash-merge commit message:

feat: always use system sheets on iOS 27, also when pushed

When the card controller got pushed onto a navigation stack, the sheet
couldn't be presented during the push transition, so the cards showed
the classic way until, e.g., the device got rotated. Now the sheet gets
presented right after the transition.

On iOS 27, the classic cards no longer show at all: until the sheet can
be presented, the cards stay hidden. `presentationStyle` and its
`.classic` option are deprecated on iOS 27, as they no longer have an
effect, so that they can be removed once iOS 27 is the minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@nighthawk nighthawk self-assigned this Oct 15, 2026
@nighthawk
nighthawk merged commit 80b55a4 into main Oct 15, 2026
3 checks passed
@nighthawk
nighthawk deleted the fix/sheet-after-push branch October 15, 2026 00:36
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