UIKit.UINavigationController Class
A UIViewController for managing hierarchical navigation.

See Also: UINavigationController Members


[Foundation.Register("UINavigationController", true)]
public class UINavigationController : UIViewController


The MonoTouch API supports two styles of event notification: the Objective-C style that uses a delegate class or the C# style using event notifications.

The C# style allows the user to add or remove event handlers at runtime by assigning to the events of properties of this class. Event handlers can be anyone of a method, an anonymous methods or a lambda expression. Using the C# style events or properties will override any manual settings to the Objective-C Delegate or WeakDelegate settings.

The Objective-C style requires the user to create a new class derived from UIKit.UINavigationControllerDelegate class and assign it to the UIKit.Delegate property. Alternatively, for low-level control, by creating a class derived from Foundation.NSObject which has every entry point properly decorated with an [Export] attribute. The instance of this object can then be assigned to the UINavigationController.WeakDelegate property.

Prior to iOS 7, the screen area covered by the UINavigationController.NavigationBar and UINavigationController.Toolbar was excluded from the area of the UINavigationController.VisibleViewController. In iOS 7, the UINavigationController.NavigationBar and UINavigationController.Toolbar float over the child controllers' UIViewController.View. Application developers who wish to modify this behavior should manipulate the UIViewController.EdgesForExtendedLayout property.

The following illustration shows how layout of a UIKit.UINavigationController is affected with UIViewController.EdgesForExtendedLayout. With the default value of UIRectEdge.All, the UIView.Frame of the UIKit.UINavigationController's UIViewController.View includes the whole screen, extending beneath the toolbar at the bottom, the navigation bar, and even the status bar. The second image shows the UIView.Frame property when UIViewController.EdgesForExtendedLayout is set to UIRectEdge.None.

Layout can also be modified by setting the UINavigationBar.Translucent property of the UINavigationController.NavigationBar to true.

Related content


Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: