Files
react-native/packages
Riccardo CipolleschiandGitHub dffbfe6fd9 [LOCAL] Fix Switch layout for iOS 26 (#53389)
* Fix Switch layout with iOS26 (#53247)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53247

Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements.
This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823).

The `<Switch>` component was using hardcoded values for its size.
This change fixes the problem by:
- Using codegen for interface only
- Implementing a custom Sadow Node to ask the platform for the Switch measurements
- Updating the JS layout to wrap the size around the native component.

[iOS][Fixed] - Fix Switch layout to work with iOS26

Pull Request resolved: https://github.com/facebook/react-native/pull/53067

Test Plan:
Tested locally with RNTester.

| iOS Version | Before | After |
| --- | --- | --- |
| < iOS 26 | https://github.com/user-attachments/assets/91d73ea3-30ba-4a5c-948e-ea5c63aa7c6d | https://github.com/user-attachments/assets/76061bc8-0f14-412a-a8fb-d1c3951772e6 |
| >= iOS 26 | https://github.com/user-attachments/assets/1abc477f-bc0a-4762-938e-98814fb2a054 | https://github.com/user-attachments/assets/77e562e1-b803-46ac-9cf6-102f062a1cd4 |

Rollback Plan:

Reviewed By: sammy-SC

Differential Revision: D79653120

Pulled By: cipolleschi

fbshipit-source-id: d99b353b7b7b5496b148779de4abe3e57dd38156

* feat: update js layout

* fix crash for feature flag
2025-08-27 12:27:24 +01:00
..
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00
2025-08-27 12:26:01 +01:00
2025-08-12 09:47:45 +00:00
2025-08-12 09:47:45 +00:00