Contents

titleView

A custom view that displays in the center of the navigation bar when the receiver is the top item.

Declaration

var titleView: UIView? { get set }

Discussion

If this property value is nil, the navigation item’s title is displayed in the center of the navigation bar when the receiver is the top item. If you set this property to a custom title, it is displayed instead of the title.

Custom views can contain buttons. Use the init(type:) method in UIButton class to add buttons to your custom view in the style of the navigation bar. Custom title views are centered on the navigation bar and may be resized to fit.

The default value is nil.

See Also

Specifying custom views