开发者

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:

Restoring navigationItem.title after removing navigationItem.titleView

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜