Restoring navigationItem.title after removing navigationItem.titleView
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 displa开发者_C百科y a title, e.g:
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?
Simply setting:
navigationItem.titleView = nil;
Will restore the text title.
精彩评论