nathantannar4 / InputBarAccessoryView

A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments
MIT License
1.15k stars 229 forks source link

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

Open JCsplash opened 1 year ago

JCsplash commented 1 year ago

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:

Simulator Screenshot - iPhone 14 Pro - 2023-06-10 at 14 34 11

Screenshot 2023-06-10 at 2 27 13 PM

Here's some videos:

https://github.com/nathantannar4/InputBarAccessoryView/assets/16738930/360d813b-0330-404b-b8db-3c2340a0f3cf

https://github.com/nathantannar4/InputBarAccessoryView/assets/16738930/41b983ed-753c-4be1-8880-1e7f0b0a7fd1

JCsplash commented 1 year ago

@nathantannar4 @Kaspik would love to hear if you guys have noticed this issue too on Xcode 14 and if there's any solutions? - besides showing inputBar in "viewDidAppear" which causes a significant delay

JCsplash commented 4 months ago

@nathantannar4 any idea how to fix this? Still an issue in xcode 15.

nathantannar4 commented 4 months ago

Not aware of a fix sorry. Seems like Apple broke something?