Repository navigation
Always use system sheets on iOS 27, also when pushed - #34
Merged
Merged
Conversation
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>
Member
Author
|
Suggested squash-merge commit message: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #33.
Why
When an app pushes a
TGCardViewControlleronto 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.viewDidAppearis 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
presentationStyleand.classicare 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-classicCardslaunch argument is gone.Testing
TGCardViewControlleronto aUINavigationController: 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 inSceneDelegateand push the storyboard's card controller.)🤖 Generated with Claude Code