10

My App has 2 tabs (tabA and tabB), based on location the I set the navigationItem.titleView of tabB to a UIImageView when - viewWillAppear: is called.

The default behaviour of tabB is to simply display a title, e.g:

Default Title

The issue is when the location changes and I remove the UIImageView navigationItem.titleView (using - removeFromSuperview), the default title has also disappeared and trying to set it with:

self.navigationItem.title = @"TITLE";

Does not work. Any ideas on how to solve this?

Richard Stelling
  • 25,607
  • 27
  • 108
  • 188

1 Answers1

24

Simply setting:

navigationItem.titleView = nil;

Will restore the text title.

Richard Stelling
  • 25,607
  • 27
  • 108
  • 188