admin管理员组文章数量:1388805
In my app, some screens are in landscape mode, while others are in portrait mode.
My problem is:
First screen is in landscape mode and second screen is in portrait mode
When navigating from the first screen to the second screen, everything works fine. However, when navigating back from the second screen to the first screen, the first screen briefly appears in portrait mode before switching to landscape. This looks like a glitch.
This issue occurs only on iOS; on Android, it works fine.
video link for more clarity
Correct Behaviour should be, When navigating back to the second screen, it should immediately appear first screen in landscape mode without briefly switching to portrait.
The transition should be smooth and consistent on iOS.
package.json file
I have used 'react-native-orientation-locker' plugin for lock & unlocking the mode
React.useEffect(() => {
Orientation.lockToLandscape();
return () => {
Orientation.unlockAllOrientations();
};}, []);
本文标签: React native ios screen orientations change problemsStack Overflow
版权声明:本文标题:React native ios screen orientations change problems - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744554991a2612417.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论