Editar

Compartir a través de


UINavigationItem.TitleView Property

Definition

A view that is displayed in the center of the navigation bar.

public virtual UIKit.UIView TitleView { [Foundation.Export("titleView", ObjCRuntime.ArgumentSemantic.Strong)] get; [Foundation.Export("setTitleView:", ObjCRuntime.ArgumentSemantic.Strong)] set; }
member this.TitleView : UIKit.UIView with get, set

Property Value

If null, the Title will be shown.

This value can be null.

Attributes

Remarks

var viewController = new SimpleViewController();
viewController.NavigationItem.TitleView = new UIView(){
	Frame = new RectangleF(0, 0, 100, 30),
	BackgroundColor =  UIColor.Green
};
var navController = new UINavigationController(viewController);
window.RootViewController = navController;
let viewController = new SimpleViewController()
viewController.NavigationItem.TitleView <- new UIView(BackgroundColor = UIColor.Green, Frame = new RectangleF(0.f, 0.f, 100.f, 30.f))

let navController = new UINavigationController(viewController)   
window.RootViewController <- navController           

Applies to