I’ve been building an app using expo and in one of the screens I need to use the landscape orientation. When returning to the previous page on iOS the layout shifts to the left of the screen until I touch one component.
This is the logic I use to shift between orientations in the component:
useFocusEffect(
useCallback(() => {
void ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.LANDSCAPE);
return () => {
void ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP);
};
}, [])
);
This is the navigator:
function App() {
return (
);
}
The orientation shifts occur within the screen FullscreenIndicador and the component tabs is tab navigator with two screens inside of it. The whole component Tabs stays bugged to the left.
It works perfectly on Android.