Xcode 14: custom inputAccessoryView appears prematurely, causing broken push animation

75 Views Asked by At

After upgrading to xcode 14, override of the inputAccessoryView of a UIViewController causes animation issues during push / pop UINavigationController transitions. (on xcode 13, no issues)

    override var inputAccessoryView: UIView? {
        return myCustomInputBar
    }

    override var canBecomeFirstResponder: Bool{
        return true
    }

The two main issues are:

  1. The inputAccessoryView flashes / appears above the current view you're transitioning away from. (inputAccessoryView should display only within the confines of it's UIViewController)

  2. The push / pop transition animation is not smooth. The new screen moves forward and then backwards briefly before continuing forward again.

https://developer.apple.com/forums/thread/721301 (this issue mentions the same thing)

Here's screenshots of the inputAccessoryView appearing prematurely:

enter image description here enter image description here

Here's Videos of the issue: Broken push animation / input bar flash

Broken pop animation / input bar flash

Current workaround: Only show inputBarAccessoryView in viewDidAppear, which fixes the animation problems during the navigationController transition but this causes a significant delay.

Has anyone else run into this issue? Any help would be very much appreciated.

0

There are 0 best solutions below