Protocol

UIBarPositioning

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

Declaration

@protocol UIBarPositioning

Overview

Bars can be positioned at the bottom of their enclosing view, at the top of their enclosing view, or at both the top of their enclosing view and also the top of the screen. In this last case, the bar will abut the status bar displayed by the system. Bars in this position need to have their background extend above their own frame to the top of the screen. This allows the background to show through the status bar.

The classes that implement bars have paired methods to set a background for a given position and set of metrics. These are named similar to the following: backgroundImageForBarPosition:barMetrics: and setBackgroundImage:forBarPosition:barMetrics:. Use these methods to set an appropriate background image for the different possible bar positions and metrics.

Topics

Accessing the Bar Position

barPosition

The position of the bar.

Required.

Constants

UIBarMetrics

Constants to specify metrics to use for appearance.

UIBarPosition

Constants to identify the position of a bar.

Relationships

Inherits From

See Also

Bars

UIBarItem

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

UIBarButtonItem

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

UIBarButtonItemGroup

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

UINavigationBar

Navigational controls displayed in a bar along the top of the screen, usually in conjunction with a navigation controller.

UISearchBar

A specialized view for receiving search-related information from the user.

UIToolbar

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

UITabBar

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

UITabBarItem

An item in a tab bar.

UIBarPositioningDelegate

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software