ios - Gap above UISearchBar using UISearchController -
i'm experiencing odd behavior uisearchbar in ios. search bar working fine:
but when set uinavigationbar.appearance().translucent = false in applicationdelegate's didfinishlaunchingwithoptions colors right in navigation bar in ios app, search bar gets white section above this:
when scrolling results table view, underlying content visible in gap:
the closest i've gotten fixing it, setting mysearchresultsviewcontroller.edgesforextendedlayout = uirectedge.none, stopped translucent gap, still doesn't have right color:
is there can prevent showing discolored gap , still have globally opaque navigation bars?
after googling, found following answer buried in search results: uisearchcontroller doesn't work non-translucent uinavigationbar
specifically, snippet worked when put in presenting view controller:
func viewdidload() { extendedlayoutincludesopaquebars = true } so simple, yet difficult guess.




Comments
Post a Comment