With IOS 11, I've encountered another one issue in UISearchController
.
As default height value became 56 rightBarButtonItem
and leftBarButtonItem
are staying in their old places, regardless of whether it's text or image.
I need to centre items to the search bar as it were in IOS 10.
refresh buttons are not centered
As you can see the item buttons are bit higher than center of searchbar.
I tried to do: [self.searchController.searchBar.heightAnchor constraintLessThanOrEqualToConstant: 44].active = YES;
But I got search bar overlapping buttons:
However, after I enter edit mode and return back by pressing Cancel - it begins to look good in case of 44 constraints.
I also tried to play with setting centerYanchor
to imageView
(of button) same as in searchBar
but had crashed.