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

50405134: Creating a new UIWindow breaks orientation changes in certain cases #21231

Open
openradar-mirror opened this issue May 2, 2019 · 0 comments

Comments

@openradar-mirror
Copy link

Description

This bug was reported against our framework (smartdevicelink/sdl_ios#1250). Basically, it appears that merely initializing a new UIWindow, even if it's not on screen, causes status bar orientation changes even when the view controller in the visible window declares that it does not change orientation.

The issue linked above describes the issue in detail.

Steps to Reproduce:

  1. Set the UIViewControllerBasedStatusBarAppearance property to YES in Info.plist of the app
        <key>UIViewControllerBasedStatusBarAppearance</key>
	<true/>
  1. Make sure your app supports Landscape left, landscape right, portrait (can be done in Target or Info.plist)
  2. Now, you should be able to choose (through your code) which view controllers will support which orientations.
  3. Thus if one view controller only wanted to support portrait, then override supportedInterfaceOrientations to return .portrait
  4. Create a new window object with a root view controller that supports all interface orientations that the app supports.
  5. Use app and rotate the device to landscape - you will see the status bar rotate even though the view controller supports portrait only

Expected Results:
View controllers that only support the portrait orientation should not see the status bar rotate when the device rotates

Actual Results:
View controllers that only support the portrait orientation do see the status bar rotate when the device rotates

Product Version: 12.2
Created: 2019-05-02T15:11:24.218843
Originated: 2019-05-02T00:00:00
Open Radar Link: http://www.openradar.me/50405134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant