searchFieldBackgroundPositionAdjustment Broken in iOS13?

Hi,


I'm using a UINavigationItem's UISearchController to display a search bar in my view controller. Previously on iOS 12 I used UISearchBar's searchFieldBackgroundPositionAdjustment property to move the UISearchController's UISearchBar down a few pts. In iOS 13, this method no longer has an effect on the position. I also could not find any documentation on any changes to this method.


Is this method deprecated?

Replies

I believe that UISearchBar now exposes it's textfield directly to you. You might try that on UISearchController's UISearchBar.


https://developer.apple.com/documentation/uikit/uisearchbar/3175433-searchtextfield