Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen UI clipped when changing orientation from portrait to landscape #2000

Closed
iamsaadMehmood opened this issue Jan 3, 2024 · 4 comments
Closed
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS

Comments

@iamsaadMehmood
Copy link

Description

When the user changes the orientation from portrait to landscape or landscape to portrait the UI clipped but after reloading the application the UI works perfectly

I have tried the following patch in RNSScreenStack.mm but it didn't work

- (void)navigationController:(UINavigationController *)navigationController
       didShowViewController:(UIViewController *)viewController
                    animated:(BOOL)animated
{
  [self emitOnFinishTransitioningEvent];
  [RNSScreenWindowTraits updateWindowTraits];
  [_controller.view setNeedsLayout]; <------- This line
}

The Following is the UI that I am getting after changing the orientation

Simulator Screenshot - iPad (10th generation) - 2023-12-28 at 12 55 29

Following is the UI which should be after changing the orientation

Simulator Screenshot - iPad (10th generation) - 2023-12-28 at 13 28 09

Tested on iPad (10th generation)
iOS 17.2.

Steps to reproduce

  1. Create Some UI that is different for landscape and portrait.
  2. Change the Device orientation from portrait to landscape or Landscape to portrait the UI will be clipped.

Snack or a link to a repository

can't share

Screens version

^3.29.0

React Native version

0.71.3

Platforms

Android, iOS

JavaScript runtime

None

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPad (10th Generation)

Acknowledgements

Yes

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS labels Jan 3, 2024
@tboba
Copy link
Member

tboba commented Jan 3, 2024

Hi @iamsaadMehmood, thanks for submitting this issue!
Do you know if this issue is related to the #1738? Is it the same problem?

@iamsaadMehmood
Copy link
Author

iamsaadMehmood commented Jan 3, 2024

Hi @iamsaadMehmood, thanks for submitting this issue! Do you know if this issue is related to the #1738? Is it the same problem?

Yes That's the same problem but the patch is not working anymore

@tboba
Copy link
Member

tboba commented Jan 3, 2024

@iamsaadMehmood Okay 👍 since we want to avoid duplicated issues in the repository, let me close this issue for now (let's move with the discussion there).
Once again, thanks for confirming this issue, I will try to fix that once I find the solution!

@tboba tboba closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

2 participants