ios - UISearchController. search controller doesn't resize after device rotated -


i'm using uisearchcontroller on view find items. search bar resizes in inactive move.however, if enable searching , rotate device landscape portrait , landscape mode again won't fit view.on view use navigation item can toggled in portrait mode. tried resize search bar view dynamically, resized position of search bar left same. initialization of search controller:

        let searchcontroller = uisearchcontroller(searchresultscontroller: nil)         searchcontroller.searchresultsupdater = self         searchcontroller.dimsbackgroundduringpresentation = false         definespresentationcontext = false         tableview.tableheaderview = searchcontroller.searchbar         tableview.register(uinib(nibname: tablecellname, bundle: nil), forcellreuseidentifier: tablecellname) 

1.there navigation view , main view search bar

2.let's enable searching , rotate device portrait , landscape again. there issue here.

  1. it seems search bar width includes width of navigation view. however,when it's inactive fits entire view. enter image description here


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -