A framework for building native applications using React
Fix Switch layout with iOS26 (#53326)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53326 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. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Reviewed By: sammy-SC Differential Revision: D80454350 fbshipit-source-id: 1d468910276f7fde4559d2ae87cf60c8494caceb
R
Riccardo Cipolleschi committed
91d427fe52a307f9aa8579912ef956d61808dad2
Parent: d28ee16
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/12/2025, 2:16:20 PM