FAPanels icon indicating copy to clipboard operation
FAPanels copied to clipboard

Does not honor center view controller supportedInterfaceOrientations property

Open robertcrabtree opened this issue 5 years ago • 0 comments

Issue:

I found an issue where the panel controller does not check the supportedInterfaceOrientations property of the centered view controller when rotating. Check out the documentation for supportedInterfaceOrientations here: https://developer.apple.com/documentation/uikit/uiviewcontroller/1621435-supportedinterfaceorientations

Let's say you set the panel controller's center view controller to be a tab bar controller. I don't want the tab bar controller to rotate. I do that by setting supportedInterfaceOrientations = .portrait. Now let's say you present a modal view controller from the tab bar controller. You should be able to rotate the modal view controller just fine. But the tab bar controller should not be anything other that portrait when you close the modal view controller, even if the phone orientation is landscape.

I created a sample project to demonstrate the problem. I'm using the default config in the sample project here: https://github.com/robertcrabtree/FAPanelsRotation. Can you please take a look?

To reproduce:

  1. Download sample project
  2. Run pod install
  3. Launch iPhone simulator in portrait mode
  4. Press the modal button
  5. Rotate the presented modal view controller to landscape
  6. Dismiss the modal view controller
  7. Notice the tab bar is also in landscape

Thanks! Let me know if you need me to clarify anything else.

robertcrabtree avatar Feb 06 '19 22:02 robertcrabtree