UIBarPositioningDelegate protocol supports the positioning of a bar that conforms to the
UIBarPositioning protocol. Navigation bars, toolbars, and search bars all have delegates that support this protocol. The delegate can use the method of this protocol to specify the bar’s position when that bar is moved to a window.
Asks the delegate for the position of the specified bar in its new window.
optional func positionForBar(_
bar: UIBarPositioning) -> UIBarPosition
The bar that was added to the window.
The position of the bar.
If your interface has a custom bar with a delegate, that delegate can implement this method and use it to specify the position of the bar that has been added to a window.
Available in iOS 7.0 and later.