Messagekit: [iOS 13] InputBarAccessoryView showing on top of presentedViewController

Created on 18 Oct 2019  路  7Comments  路  Source: MessageKit/MessageKit

MessageKit version(s):
3.0.0-beta-swift5
iOS version(s):
iOS 13
Devices/Simulators affected:
iPhone 11
A well written description of the problem you are experiencing:
The messageInputBar is showing above the presentedViewController when a user puts the app into the background and then returns it to the foreground
Please provide complete steps to reproduce the issue:
NOTE: in iOS 13 Apple introduced a new card style for modal presentations, so perhaps this is related to other changes that came with that.

This only occurs when the inputTextView is currently the first responder while a VC is being presented

  • My presenting VC is a subclass of MessagesViewController and it is calling present(:animated:completion:)
  • The presented VC shows in the iOS 13 modal card style, with the messageInputBar being hidden underneath (as expected)
  • If the user moves the app to the background at this point, and then returns to the app, the messageInputBar is now showing above the presented VC (see attached image)

For UI related issues, please provide a screenshot/GIF/video showing the issue:
Video: https://www.dropbox.com/s/h9c3nf3hpmmu9me/Screen%20Recording%202019-10-18%20at%2012.33.23%20PM.mov?dl=0
Image: https://www.dropbox.com/s/qcjosi8noduspgs/Screenshot%202019-10-18%2012.34.05.png?dl=0

stale

All 7 comments

I should note that one workaround I have tried is to always call resignFirstResponder() on inputTextView when viewWillDisapper(:) is called, but in iOS 13 this method never gets called during a modal presentation.

Try to put modalPresentationStyle .fullscreen before present method , it will remove the card style presentation

@atacand1920, yes but this is for the future of the framework, iOS 13 encourages the card style modal.

This issue has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This issue has been auto-closed because there hasn't been any activity for at least 21 days. However, we really appreciate your contribution, so thank you for that! 馃檹 Also, feel free to open a new issue if you still experience this problem 馃憤.

I'm having the same issue when trying to present a new UIWindow above the MessagesViewController.

Would love to see a workaround for this.

I have the same issue. Currently handling it by showing and hiding the input bar manually when presenting another view controller self.messageInputBar.isHidden = true. Hope there is a better way to do this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pawankmrai picture pawankmrai  路  3Comments

ChandraPrakashJangid picture ChandraPrakashJangid  路  3Comments

yspreen picture yspreen  路  3Comments

mlequeux picture mlequeux  路  3Comments

Leon12345679 picture Leon12345679  路  3Comments