Skip to content

Conversation

@lodev09
Copy link
Owner

@lodev09 lodev09 commented Jan 10, 2026

Summary

Follow-up to #400. Improves screen dismiss detection on iOS by using RNSLifecycleListenerProtocol instead of NSNotification observers.

New react-native-screens PR: software-mansion/react-native-screens#3527

Changes

  • Replace NSNotification-based screen dismiss detection with RNSLifecycleListenerProtocol
  • Create snapshot of containerView during unmount to prevent visual glitches
  • Patch react-native-screens to expose lifecycle events to presented controllers

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Test Plan

  1. Open sheet from a modal screen
  2. Navigate to another screen within the modal while sheet is open
  3. Pop the screen - sheet should dismiss properly without visual artifacts
  4. Test goBack() button on TestScreen in example app
after.mov

Checklist

  • I tested on iOS
  • I tested on Android
  • I tested on Web
  • I updated the documentation (if needed)
  • I added a changelog entry (if needed)

- Add RNSLifecycleListenerProtocol to react-native-screens patch
- TrueSheetViewController conforms to protocol to receive screen lifecycle events
- Rename viewControllerDidDetectPresenterDismiss to viewControllerDidDetectScreenDismiss
- Remove notification-based approach in favor of protocol-based approach
@vercel
Copy link

vercel bot commented Jan 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
react-native-true-sheet Ready Ready Preview, Comment Jan 10, 2026 1:16am

@lodev09 lodev09 merged commit 1217390 into main Jan 10, 2026
5 checks passed
@lodev09 lodev09 deleted the fix/screen-dismiss-detection branch January 10, 2026 01:16
@lodev09
Copy link
Owner Author

lodev09 commented Jan 10, 2026

🚀 This pull request is included in v3.7.1. See Release 3.7.1 for release notes.

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.

2 participants