A set of methods that support the positioning of a bar that conforms to the UIBarPositioning protocol.


Navigation bars, toolbars, and search bars all have delegates that support the UIBarPositioning protocol. The delegate can use the method of this protocol to specify the bar’s position when that bar is moved to a window. The UINavigationBarDelegate, UISearchBarDelegate, and UIToolbarDelegate protocols extend this protocol to allow for the positioning of those bars on the screen.


Positioning Bars

func position(for: UIBarPositioning)

Asks the delegate for the position of the specified bar in its new window.

See Also


class UIBarItem

An abstract superclass for items that can be added to a bar that appears at the bottom of the screen.

class UIBarButtonItem

A button specialized for placement on a toolbar or tab bar.

class UIBarButtonItemGroup

A set of bar button items on the shortcuts bar above the keyboard on iPad.

class UINavigationBar

A control that supports navigation of hierarchical content, most often used in navigation controllers.

class UISearchBar

A text field–like control that supports text-based searches.

class UIToolbar

A control that displays one or more buttons along the bottom edge of your interface.

class UITabBar

A control that displays one or more buttons in a tab bar for selecting between different subtasks, views, or modes in an app.

class UITabBarItem

An item in a tab bar.

protocol UIBarPositioning

A set of methods for defining the ways that bars can be positioned in iOS apps.