5

I am using inputAccessoryView of UIViewController. Everything works fine until I change UIWindows rootViewController. After that safeAreaInsets for portrait are reported as landscape and other way around.

This is only happening when changing from rootViewController that has keyboard input.

Here is example project that reproduces the issue: https://github.com/jcavar/ChangeRootSafeArea

I guess it is some magic in UITextEffectsWindowthat causes this. I tried removing it completely before changing rootViewControllerbut then input accessory view doesn't come up anymore.

Any ideas about this?

Pratik Sodha
  • 3,679
  • 2
  • 19
  • 38
josip04
  • 224
  • 3
  • 13
  • It might not be related to the issue you have mentioned. but, you are using `super.viewDidLoad()` in `override func viewDidAppear(_ animated: Bool)` – Satish Oct 03 '18 at 12:40
  • I managed to workaround this problem by setting `UITextEffectsWindow` `rootViewController` to `nil` and then back to original root – josip04 Oct 08 '18 at 10:24

0 Answers0