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
Easiest Way to Find Square Root in Swift
Swift: Assigning Function to Variable
Why Don't Structs Have Deinitializers in Swift Like Classes
Is Code Coverage Already Working for Swift
How to Capture Local Variable Inside an Async Closure in Swift
Is There No Default(T) in Swift
How to Remove Multiple Items from a Swift Array
How to Cancel Dispatchqueue.Main.Asyncafter(Deadline: Time) in Swift3
Swift 3D Touch iOS 10 Home Screen Quick Actions Share Item Missing
Why Is the ! in Swift Called an 'Implicitly' Rather Than 'Explicitly' Unwrapped Optional
Swift - Initialize View Controller from Storyboard by Overriding Init
Swift, Nsjsonserialization and Nserror
Xcode 8 Swift Update with Error "Use Legacy Swift Language Version"
Understanding @Binding in Swiftui
How to Specify That a Generic Is a Value Type
Xcode 9 - Test Target X Encountered an Error (Unable to Connect to Test Manager)