iOS 13 Strange Search Controller Gap

iOS 13 strange search controller gap

Setting

extendedLayoutIncludesOpaqueBars = true

in the UIViewController used to show the search results, fixed the issue for me.

UISearchController searchbar in a tableview header leaves status bar sized gap

I fixed it by changing the "top" auto layout anchor of the view that holds the segment controller from "super view" to "top layout guide". this moved the gap up to where the status bar is and changing the entire view's background color to the same color blue as the navbar made it seamless.

How to prevent gap between uinavigationbar and view in iOS 13?

override func viewWillAppear(_ animated: Bool) {  
super.viewWillAppear(animated)
if #available(iOS 13.0, *) {
navigationController?.navigationBar.setNeedsLayout()
}
}

We found this work around here and it worked for us.

Navigation bar gets blocked after pressing Cancel in UISearchController

I encountered the same problem, if I cancel the searchBar and change the navigationItem.title then I have a double title . It's like a ghost layer of the navigation bar stays here in the navigation controller.

This is how I fixed it:

searchController.hidesNavigationBarDuringPresentation = true

Probably best to use it until Apple fix this issue.

I also noticed that the back button switch to default color (blue), as if the navigationBar TintColor was reset.

Config:
- Xcode 11.0 (11A420a)
- iOS 13.1 (17A5844a)

iOS 11: UISearchController has a strange space in between UITableView and UISearchBar

Do autolayout properly of your tableview.
Remove all constraints and do it, remember your vertical space constraint should be 0.

Thanks.



Related Topics



Leave a reply



Submit