Skip to content

fix(ios): respect disablePageAnimations during tab switches - #610

Merged
thiagobrez merged 4 commits into
callstack:mainfrom
LeleDallas:fix/ios-disable-page-animations
Nov 4, 2026
Merged

thiagobrez merged 4 commits into
callstack:mainfrom
LeleDallas:fix/ios-disable-page-animations

Conversation

@LeleDallas

Copy link
Copy Markdown
Contributor

PR Description

Note

This PR fixes disablePageAnimations not being respected when switching tabs on iOS versions earlier than 26.

The flag is now forwarded to the UITabBarControllerDelegate, which provides a zero-duration transition when animations are disabled.
When the flag is false, UIKit's default transition behavior is preserved.
This replaces the iOS workaround that temporarily disabled animations globally through UIView.setAnimationsEnabled, keeping the change scoped to tab transitions.

How to test?

  • Build and run the example app on an iOS simulator running a version earlier than 26, such as iOS 18;
  • Open the example using <FourTabs disablePageAnimations />;
  • Switch between tabs repeatedly and verify that the content changes immediately, without a transition animation or blank screens;
  • Open the regular <FourTabs /> example and verify that default transition behavior is preserved;
  • Repeat on iOS 26 or later to check for regressions.

Screenshots

Master Current patch
Screen.Recording.2026-10-30.at.10.26.56.mov
Screen.Recording.2026-10-30.at.10.27.45.mov

@oleksandrzavarzin-callstack

Copy link
Copy Markdown
Contributor

Thanks @LeleDallas, this works well! I tested it with a repro app on iPhone 17 simulators.

Small nitpick comment:
The change-set text is a commit subject. Other change-sets use a sentence, for example "Respect disablePageAnimations when switching tabs on iOS.".

@LeleDallas

Copy link
Copy Markdown
Contributor Author

Thanks @LeleDallas, this works well! I tested it with a repro app on iPhone 17 simulators.

Small nitpick comment: The change-set text is a commit subject. Other change-sets use a sentence, for example "Respect disablePageAnimations when switching tabs on iOS.".

Addressed here ceb63c2, let me know if is ok now 😄

@thiagobrez thiagobrez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @LeleDallas !

@thiagobrez
thiagobrez added this pull request to the merge queue Nov 4, 2026
Merged via the queue into callstack:main with commit d9dbefb Nov 4, 2026
6 checks passed
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.

3 participants