iOS Guides | Samples

MonoTouch.UIKit.UINavigationItem Class

The visual navigation elements of an object pushed onto a UINavigationBar.

See Also: UINavigationItem

Syntax

[MonoTouch.Foundation.Register("UINavigationItem", true)]
public class UINavigationItem : NSObject, INSCoding, IDisposable

Remarks

This class encapsulates the visual navigation-related elements of an object pushed onto a UINavigationBar. The UINavigationItem.Title property must be set to properly display. By default, the UINavigationBar displays a back button and the UINavigationItem.Title centered. Application developers can override this appearance by setting the UINavigationItem.LeftBarButtonItems, UINavigationItem.RightBarButtonItems, and UINavigationItem.TitleView properties.

Related content

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.UIKit.UINavigationItem are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

BackBarButtonItemUIBarButtonItem. The UIBarButtonItem used for "Back" button functionality.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
HidesBackButtonBoolean. Whether the back button is hidden.
LeftBarButtonItemUIBarButtonItem. The first item in the UINavigationItem.LeftBarButtonItems array.
LeftBarButtonItemsUIBarButtonItem[]. An array of UIBarButtonItems to be displayed on the left side of the UINavigationBar.
LeftItemsSupplementBackButtonBoolean. Whether the UINavigationItem.BackBarButtonItem should be shown in addition to the UINavigationItem.LeftBarButtonItems.
PromptString. A line of text displayed across the top of the navigation bar.
RightBarButtonItemUIBarButtonItem. The first item in the UINavigationItem.RightBarButtonItems array.
RightBarButtonItemsUIBarButtonItem[]. An array of UIBarButtonItems displayed to the right of the UINavigationItem.TitleView.
TitleString. A value to be displayed in the center of the navigation bar.
TitleViewUIView. A view that is displayed in the center of the navigation bar.

Public Methods

SetHidesBackButton(Boolean, Boolean)
Sets whether the back button is hidden, with the option to animate the change.
SetLeftBarButtonItem(UIBarButtonItem, Boolean)
Specifies the button to appear on the left-hand side, optionally animating its assignment.
SetLeftBarButtonItems(UIBarButtonItem[], Boolean)
Sets multiple buttons to be displayed on the left side of the navigation bar, optionally animating their assignment.
SetRightBarButtonItem(UIBarButtonItem, Boolean)
Sets the button to display on the right side of the navigation bar, optionally animating its assignment.
SetRightBarButtonItems(UIBarButtonItem[], Boolean)
Sets multiple buttons to be displayed on the right side of the navigation bar, optionally animating their assignment.