ios11 - UISearchController.hidesNavigationBarDuringPresentation ignored with scopeButtons in iOS 11 Beta -
in our project specified hidesnavigationbarduringpresentation = false on particular uiviewcontroller's uisearchcontroller. searchcontroller has array of scope titles. far works fine ios 10, in ios 11 betas, looks false setting of hidesnavigationbarduringpresentation ignored , messes our display. make sure it's not because of other factors in project, created bare-bone test project single uitableviewcontroller, uisearchcontroller initialized simple uitableviewcontroller. following code in viewdidload() method on main view controller:
self.title = "search bar scope test" let searchviewcontroller = searchviewcontroller(style: .plain) searchcontroller = uisearchcontroller(searchresultscontroller: searchviewcontroller) searchcontroller!.searchbar.sizetofit() tableview.tableheaderview = searchcontroller!.searchbar searchcontroller?.hidesnavigationbarduringpresentation = false searchcontroller?.searchbar.scopebuttontitles = ["scope 1", "scope 2", "scope 3", "scope 4", "scope 5"]
when last line assigning scopebuttontitles not present, navigation bar didn't hidden , search bar remains in original position. however, line present, navigation bar becomes hidden , searchbar plus scope buttons moved in portrait mode on both iphone , ipad, stays same in landscape mode (even if scope buttons many , can't fit in 1 line).
did else encounter this? bug or expected behavior (certainly not our desired behavior though) in ios 11, , there workaround?
thanks!
Comments
Post a Comment