I just experienced the same problem. This definitely looks like a bug in UIKit. It would definitely be something a radar feed would be worthy.
I found a very hacky way to mitigate it, though:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { //Fixes a bug in UIKit where the refresh control is broken when `hidesSearchBarWhenScrolling` is NO. if (@available(iOS 11.0, *)) { self.navigationItem.hidesSearchBarWhenScrolling = scrollView.contentOffset.y < -scrollView.adjustedContentInset.top; } }
Basically, what happens is that whenever the scrolling is viewed from above (where the update control becomes visible), this bit of code will turn hidesSearchBarWhenScrolling back into YES . When the user scrolls back the page again, it will be set to NO , and the search bar will remain visible.
I hope Apple fixes this in a future version of iOS, but for the current delivery versions this will probably have to be done.
source share