I want my search bar to draw its background extended upwards below the status bar like this:
I was having the exact same issue, but forcing clipsToBounds to YES for the searchBar, did the trick. No need of auto-layout nor UIBarPositioning protocol methods.
You conform to the UIBarPositioningDelegate
protocol and upon properly becoming the delegate for your SearchBar, implement the delegate method as such
-(UIBarPosition)positionForBar:(id<UIBarPositioning>)bar { return UIBarPositionTopAttached; }