leavez
leavez

Reputation: 2218

How to add text above the navigation bar

how to add assistant text above navigation bar or toolbar. Just like this in the mail app, i want a big navigation bar with some text above titles.

Should I use navigation bar or use a toolbar and how should I implement that.

enter image description here

Upvotes: 1

Views: 1202

Answers (3)

Mrunal
Mrunal

Reputation: 14128

There is property named "prompt" in UINavigationBarItem. Refer UINavigationBarItem Class Reference

That one will solved exactly your requirement. This property will allow developer to add a title above the navigation bar. You can simply try with doing the same in sample storyboard example.

Check this:

enter image description here

Hope this helps.

Upvotes: 1

NightFury
NightFury

Reputation: 13546

You should use prompt property of UINavigationItem.

self.navigationItem.prompt = @"Extra text;

See doc for reference:

Reference for Prompt Property

Upvotes: 0

Desdenova
Desdenova

Reputation: 5377

That is UINavigationItem's prompt.

Like this:

[[self navigationItem] setPrompt:@"YourString"];

Upvotes: 0

Related Questions