How to set the title of a Navigation Bar programmatically?

Doug Null picture Doug Null · May 27, 2011 · Viewed 90.5k times · Source

I have a Navigation Bar in a view, and I want to change its Navigation Item title programmatically.

How is this done?

Answer

arclight picture arclight · May 27, 2011

In your UIViewController

self.navigationItem.title = @"The title";