0

I have 1 (rootViewController) view controller which is embedded in navigation controller. Then i pushed another view controller (secondViewController), which has search controller in title view. When i am trying search become first responder (Active) i got this in terminal:

Warning: Attempt to present "AppName.CustomSearchViewController: 0x7face0c20eb0> on whose view is not in the window hierarchy!

This happens only in iOS lower than 11. When i embed this second view controller in navigation controller and present it modally all works good, but i need exactly pushing. How can i solve this?

Dmitriy Greh
  • 684
  • 8
  • 17
  • This error occurs when i am trying to make active my search controller and system present it from my root view controller in navigation stack! Not from currently active. I have red that i need to set definesPresentationContext to true, but it does not work on iOS lower 11! –  Dmitriy Greh May 22 '18 at 11:38

1 Answers1

0

I solved it! I need to make definesPresentationContext false in rootViewController to make it work on another one!

Dmitriy Greh
  • 684
  • 8
  • 17