nathantannar4 / InputBarAccessoryView

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

The bar reappear when I remove the viewcontroller view from a container view controller #211

Closed fatlung closed 3 years ago

fatlung commented 3 years ago

It works great if using push view controller, but not in a contained viewcontroller.

In my case it is one of the viewcontrollers in a UIPageViewController which added (addSubview(page.view) by the UITabbarController

The way that to encounter this issue is

  1. Go to that viewcontroller
  2. Click on the bar
  3. Keyboard shows up
  4. Click back button which will dismiss the entire page view controller
  5. The keyboard and view dismissed but the bar remains and cover the tab bar
  6. The view controller holds the InputBarAccessoryView cannot be deinited

Sorry that I could not provide the entire code, because the code is too bulky and have too many viewcontrollers in the hierarchy

fatlung commented 3 years ago

Weird, I removed a line that remove subviews and it works now, closing this, Im sorry